Переписал 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
|
# 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/
|
||||||
|
|
||||||
|
|
|
||||||
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
|
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" ]
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue