Переписал Dockerfile, теперь образы контейнеров весят меньше

This commit is contained in:
B4D_US3R 2026-01-01 21:24:40 +05:00
parent 4f998a2730
commit 9455220a0b
3 changed files with 13 additions and 2 deletions

1
.gitignore vendored
View file

@ -19,6 +19,7 @@ config.yaml
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out
kiki kiki
redis_data
# Dependency directories (remove the comment below to include it) # Dependency directories (remove the comment below to include it)
# vendor/ # vendor/

View file

@ -1,4 +1,6 @@
FROM golang:1.24 FROM golang:1.24-alpine AS build
RUN apk add --no-cache make
WORKDIR /app/kiki WORKDIR /app/kiki
@ -14,4 +16,12 @@ COPY Makefile /app/kiki/
RUN make RUN make
FROM alpine:latest
WORKDIR /app/kiki/
COPY --from=build /app/kiki/kiki /app/kiki/kiki
RUN chmod +x /app/kiki/kiki
CMD [ "/app/kiki/kiki", "run" ] CMD [ "/app/kiki/kiki", "run" ]

View file

@ -1,6 +1,6 @@
services: services:
kiki: kiki:
build: ./ image: git.catgirls.asia/b4d_us3r/kiki:latest
restart: always restart: always
volumes: volumes:
- ./config.yaml:/app/kiki/config.yaml - ./config.yaml:/app/kiki/config.yaml