pushbits/Dockerfile
2020-07-27 22:05:00 +02:00

19 lines
244 B
Docker

FROM golang:latest as builder
WORKDIR /build
COPY . .
RUN set -ex \
&& go get -d -v \
&& CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM scratch
WORKDIR /
COPY --from=builder /build/app .
USER 1000
CMD ["./app"]