From c98781ac76189f7b89740ffeb90126b0187b7ab9 Mon Sep 17 00:00:00 2001 From: Matt Gleich Date: Fri, 26 Jul 2024 01:24:42 -0400 Subject: [PATCH] feat: just create .env file during alpine image stage Signed-off-by: Matt Gleich --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dfb2b24..ff0cc29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM golang:1.22.5 AS build WORKDIR /src COPY . . -RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/lcp ./main.go && touch .env +RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/lcp ./main.go FROM alpine:3.20.2 @@ -12,6 +12,6 @@ RUN apk add --no-cache ca-certificates=20240705-r0 WORKDIR /src COPY --from=build /bin/lcp /bin/lcp -COPY --from=build /src/.env ./.env +RUN touch .env CMD ["/bin/lcp"]