Skip to content

Commit

Permalink
add dockerfile for distroless image
Browse files Browse the repository at this point in the history
  • Loading branch information
iliazeus committed Feb 20, 2024
1 parent f62e98d commit 99bf3bc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.22-bookworm as golang
WORKDIR /app

RUN apt-get update && apt-get install -y apt-file libwebp-dev

COPY ["go.mod", "go.sum", "./"]
RUN go mod download && go mod verify

COPY ./ ./
RUN CGO_ENABLED=1 go build -o app ./

FROM gcr.io/distroless/base-debian12
COPY --from=golang /usr/lib/*/libwebp*.so* /usr/lib/
COPY --from=golang /app/app /achievement-bot
CMD ["/achievement-bot"]

0 comments on commit 99bf3bc

Please sign in to comment.