Skip to content

Instantly share code, notes, and snippets.

@renefritze
Created April 5, 2019 11:50
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 renefritze/f53bfa1a80d2ae470d72cce5ef3ae9c2 to your computer and use it in GitHub Desktop.
Save renefritze/f53bfa1a80d2ae470d72cce5ef3ae9c2 to your computer and use it in GitHub Desktop.
Multi-Stage build for bulldozer
FROM nmiyake/go:go-darwin-linux-1.11-t134 as builder
# copying these here allows to cache the download
COPY godelw /go/src/github.com/palantir/bulldozer/
COPY godel/config /go/src/github.com/palantir/bulldozer/godel/config/
WORKDIR /go/src/github.com/palantir/bulldozer
RUN ./godelw download || true
COPY . /go/src/github.com/palantir/bulldozer
RUN ./godelw build
FROM scratch
STOPSIGNAL SIGINT
# add static files
COPY docker/ca-certificates.crt /etc/ssl/certs/
# add application files
COPY --from=builder \
/go/src/github.com/palantir/bulldozer/build/bulldozer/*/linux-amd64/bulldozer \
/app/
ENTRYPOINT ["/app/bulldozer"]
CMD ["server", "--config", "/secrets/bulldozer.yml", "--debug"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment