Skip to content

Instantly share code, notes, and snippets.

@xphyr
Created May 1, 2020 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xphyr/693ebe644363ae694666b940094d1f6c to your computer and use it in GitHub Desktop.
Save xphyr/693ebe644363ae694666b940094d1f6c to your computer and use it in GitHub Desktop.
Golang Docker build
FROM docker.io/golang as john_builder
WORKDIR /opt/app-root
ADD . /opt/app-root
RUN CGO_ENABLED=0 GOOS=linux go build -o bin/4john
FROM docker.io/alpine:latest
COPY --from=john_builder /opt/app-root/bin/4john /usr/bin/4john
ENTRYPOINT [ "4john" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment