mirror of
https://github.com/bvanroll/stage-backend.git
synced 2025-08-29 20:12:46 +00:00
9 lines
268 B
Plaintext
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"] |