Created
April 5, 2019 11:50
-
-
Save renefritze/f53bfa1a80d2ae470d72cce5ef3ae9c2 to your computer and use it in GitHub Desktop.
Multi-Stage build for bulldozer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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