Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FROM golang:latest AS build
WORKDIR $GOPATH/{your-repo}
COPY . ./
RUN go get
RUN godep get
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app .
FROM scratch
COPY --from=build /app ./
ENTRYPOINT ["./app"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.