mirror of
https://github.com/the-programmers-hangout/swiftspiracy-bot.git
synced 2026-09-09 16:06:26 +02:00
fancy multi stage builder pattern
This commit is contained in:
+9
-1
@@ -1,7 +1,15 @@
|
|||||||
FROM golang:alpine AS builder
|
FROM golang:alpine AS builder
|
||||||
RUN apk --update add ca-certificates git make bash
|
RUN apk --update add ca-certificates git make bash
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
RUN go mod tidy
|
RUN go mod tidy
|
||||||
RUN make bot
|
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