Переписал Dockerfile, теперь образы контейнеров весят меньше
This commit is contained in:
parent
4f998a2730
commit
9455220a0b
3 changed files with 13 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -19,6 +19,7 @@ config.yaml
|
|||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
kiki
|
||||
redis_data
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
||||
|
|
|
|||
12
Dockerfile
12
Dockerfile
|
|
@ -1,4 +1,6 @@
|
|||
FROM golang:1.24
|
||||
FROM golang:1.24-alpine AS build
|
||||
|
||||
RUN apk add --no-cache make
|
||||
|
||||
WORKDIR /app/kiki
|
||||
|
||||
|
|
@ -14,4 +16,12 @@ COPY Makefile /app/kiki/
|
|||
|
||||
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" ]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
kiki:
|
||||
build: ./
|
||||
image: git.catgirls.asia/b4d_us3r/kiki:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- ./config.yaml:/app/kiki/config.yaml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue