mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00

Remove `GOARCH=amd64` to allow for MultiArch builds. Signed-off-by: Marco Ochse <t3chn0m4g3@users.noreply.github.com>
30 lines
430 B
Docker
30 lines
430 B
Docker
FROM golang:alpine AS builder
|
|
|
|
ENV GO111MODULE=on \
|
|
CGO_ENABLED=0 \
|
|
GOOS=linux
|
|
|
|
RUN apk add git
|
|
|
|
WORKDIR /build
|
|
|
|
# Download dependency
|
|
COPY . .
|
|
RUN go mod download
|
|
|
|
|
|
# Build
|
|
RUN go build -o main .
|
|
|
|
WORKDIR /dist
|
|
|
|
RUN cp /build/main .
|
|
|
|
# Use scratch image as finally tiny container
|
|
FROM scratch
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /dist/main /
|
|
|
|
ENTRYPOINT ["/main"]
|