mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-06-13 12:19:31 +07:00
feat: using scratch image w/ copy binary from other distro, and included healthcheck
This commit is contained in:
parent
6c6b9b076b
commit
ff39a6cd82
10
Dockerfile
10
Dockerfile
@ -19,10 +19,14 @@ COPY backend/ ./
|
||||
COPY --from=frontend /app/dist ./ui/dist
|
||||
RUN make
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
FROM scratch
|
||||
|
||||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=ghcr.io/tarampampam/curl:8.6.0 /bin/curl /bin/curl
|
||||
COPY --from=backend /app/main /bin/main
|
||||
|
||||
RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
HEALTHCHECK --interval=5m --timeout=2s --retries=3 --start-period=15s CMD [ \
|
||||
"curl", "--fail", "http://127.0.0.1:3909" \
|
||||
]
|
||||
|
||||
CMD [ "/bin/main" ]
|
||||
ENTRYPOINT [ "main" ]
|
Loading…
x
Reference in New Issue
Block a user