From 19b4810dedae83b7256733c135a2e4100e5ff4ce Mon Sep 17 00:00:00 2001 From: gadotroee <55343099+gadotroee@users.noreply.github.com> Date: Wed, 26 Jan 2022 15:22:52 +0200 Subject: [PATCH] Docker file best practices (#698) (based on https://github.com/up9inc/mizu/pull/692/files) --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index af784adc1..146ff555e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -82,6 +82,9 @@ RUN go build -ldflags="-extldflags=-static -s -w \ ARG TARGETARCH=amd64 FROM ${TARGETARCH}/busybox:latest +# gin-gonic runs in debug mode without this +ENV GIN_MODE=release + WORKDIR /app # Copy binary and config files from /build to root folder of scratch container. @@ -89,8 +92,5 @@ COPY --from=builder ["/app/agent-build/mizuagent", "."] COPY --from=front-end ["/app/ui-build/build", "site"] COPY --from=front-end ["/app/ui-build/build-ent", "site-standalone"] -# gin-gonic runs in debug mode without this -ENV GIN_MODE=release - # this script runs both apiserver and passivetapper and exits either if one of them exits, preventing a scenario where the container runs without one process -ENTRYPOINT "/app/mizuagent" +ENTRYPOINT ["/app/mizuagent"]