github.com/Blockdaemon/celo-blockchain@v0.0.0-20200129231733-e667f6b08419/Dockerfile.alltools (about) 1 FROM ubuntu:16.04 as rustbuilder 2 RUN apt update && apt install -y curl musl-tools 3 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y 4 RUN $HOME/.cargo/bin/rustup install 1.37.0 && $HOME/.cargo/bin/rustup default 1.37.0 && $HOME/.cargo/bin/rustup target add x86_64-unknown-linux-musl 5 ADD ./vendor /go-ethereum/vendor 6 RUN cd /go-ethereum/vendor/github.com/celo-org/bls-zexe/bls && $HOME/.cargo/bin/cargo build --target x86_64-unknown-linux-musl --release 7 8 # Build Geth in a stock Go builder container 9 FROM golang:1.11-alpine as builder 10 11 RUN apk add --no-cache make gcc musl-dev linux-headers 12 ADD . /go-ethereum 13 RUN mkdir -p /go-ethereum/vendor/github.com/celo-org/bls-zexe/bls/target/release 14 COPY --from=rustbuilder /go-ethereum/vendor/github.com/celo-org/bls-zexe/bls/target/x86_64-unknown-linux-musl/release/libbls_zexe.a /go-ethereum/vendor/github.com/celo-org/bls-zexe/bls/target/release 15 COPY --from=rustbuilder /go-ethereum/vendor/github.com/celo-org/bls-zexe/bls/target/x86_64-unknown-linux-musl/release/libbls_snark.a /go-ethereum/vendor/github.com/celo-org/bls-zexe/bls/target/release 16 RUN cd /go-ethereum && make all 17 18 # Pull all binaries into a second stage deploy alpine container 19 FROM alpine:latest 20 ARG COMMIT_SHA 21 22 RUN apk add --no-cache ca-certificates 23 COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ 24 RUN echo $COMMIT_SHA > /version.txt 25 26 EXPOSE 8545 8546 30303 30303/udp