mirror of
https://github.com/the-programmers-hangout/swiftspiracy-bot.git
synced 2026-09-04 09:16:01 +02:00
fancy multi stage builder pattern
This commit is contained in:
+9
-1
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user