mlpdraftbot/Dockerfile
Hamcha 37435c9706
All checks were successful
continuous-integration/drone/push Build is passing
Use better dockerfile
2019-08-22 14:48:33 +02:00

20 lines
No EOL
339 B
Docker

FROM golang:alpine AS builder
ENV GOPROXY https://modules.fromouter.space
ENV GO111MODULE=on
WORKDIR /app
# Get updated modules
COPY ./ ./
RUN go mod download
# Compile code
RUN CGO_ENABLED=0 go build -o /svc .
FROM scratch AS final
# Import the compiled executable from the first stage.
COPY --from=builder /svc /svc
CMD [ "/svc" ]