Skip to content

Commit

Permalink
feat: just create .env file during alpine image stage
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <[email protected]>
  • Loading branch information
gleich committed Jul 26, 2024
1 parent 085393f commit c98781a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ 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

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"]

0 comments on commit c98781a

Please sign in to comment.