Skip to content

Instantly share code, notes, and snippets.

@brianpgerson
Created December 17, 2020 00:14
Show Gist options
  • Save brianpgerson/16759f597c93aa5bf5283be3b15e4727 to your computer and use it in GitHub Desktop.
Save brianpgerson/16759f597c93aa5bf5283be3b15e4727 to your computer and use it in GitHub Desktop.
FROM golang:latest as builder
COPY . /server
WORKDIR /server
ENV GO111MODULE=on
RUN CGO_ENABLED=0 GOOOS=linux go build -o serverexec ./server/main.go
FROM alpine:latest
WORKDIR /root/
COPY --from=builder /server .
CMD ["./serverexec"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment