Skip to content

Instantly share code, notes, and snippets.

@c1982
Last active March 29, 2019 23:18
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 c1982/ed980e1f3d4d49a6656c1ee12aa8720e to your computer and use it in GitHub Desktop.
Save c1982/ed980e1f3d4d49a6656c1ee12aa8720e to your computer and use it in GitHub Desktop.
Example for my blog post
FROM golang:1.11.6 as builder
ARG VERSION
ENV CGO_ENABLED=0
WORKDIR $GOPATH/src/md5go
COPY . .
RUN go install -a --installsuffix cgo -ldflags "-X main.Version=${VERSION}" ./...
FROM iron/base
COPY --from=builder /go/bin/md5go /usr/local/bin
RUN chmod a+x /usr/local/bin/md5go
ENTRYPOINT ["/usr/local/bin/md5go"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment