Files
sower/deploy/Dockerfile
T
2019-01-19 11:03:32 +08:00

18 lines
316 B
Docker

# Compile
FROM golang:1.11-alpine AS compiler
RUN apk add --no-cache git make
# enable go modules
WORKDIR /go-mod
COPY . .
# do not worry about downloading dependency, sower will fix this.
RUN CGO_ENABLED=0 make build
# Build image
FROM scratch
COPY --from=compiler /go-mod/sower /sower
ENTRYPOINT [ "/sower" ]