fancy multi stage builder pattern

This commit is contained in:
Khinshan Khan
2025-04-01 23:23:30 -04:00
parent 3c72b8c0c3
commit 37ea337aad
+9 -1
View File
@@ -1,7 +1,15 @@
FROM golang:alpine AS builder
RUN apk --update add ca-certificates git make bash
WORKDIR /app
COPY . ./
RUN go mod tidy
RUN make bot
ENTRYPOINT ["bin/bot"]
FROM alpine
RUN apk --no-cache add ca-certificates
COPY --from=builder /app/bin/bot /bot
ENTRYPOINT ["/bot"]