Skip to content

Commit

Permalink
distroless docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast committed Oct 27, 2023
1 parent fd9bd98 commit d24efd4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3-alpine3.18
FROM golang:1.21.3-alpine3.18 as build

COPY . /app
WORKDIR /app
Expand All @@ -8,6 +8,10 @@ RUN mkdir /app/public

RUN CGO_ENABLED=0 GOOS=linux go build -o /app/bin/🍍

FROM gcr.io/distroless/static-debian11

COPY --from=build /app/bin/🍍 /bin

EXPOSE 8000

CMD /app/bin/🍍 -port 8000 -public /app/public
CMD ["/bin/🍍", "-port", "8000", "-public", "/app/public"]

0 comments on commit d24efd4

Please sign in to comment.