static-file-server/Dockerfile
2018-12-20 09:59:09 -05:00

16 lines
260 B
Docker

FROM golang:1.11 as builder
EXPOSE 8080
RUN mkdir -p /build
WORKDIR /build
COPY . .
RUN go test -cover ./...
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o /serve /build/bin/serve
FROM scratch
COPY --from=builder /serve /
ENTRYPOINT ["/serve"]
CMD []