Files
stage-backend/src/dockerfile
2020-03-25 11:20:14 +01:00

9 lines
268 B
Plaintext

FROM golang:alpine as builder
RUN mkdir /build
COPY main.go /build/main.go
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main .
FROM scratch
COPY --from=builder /build/main /main
EXPOSE 80
CMD ["./main"]