multi-stage build

This commit is contained in:
Andre Fernandes 2017-05-22 18:04:09 -03:00
parent 33b158e0ed
commit 72b8e97835

View file

@ -1,12 +1,14 @@
FROM alpine:3.5 FROM vertigo/go-builder as builder
ADD . /go-ethereum ADD . /go-ethereum
RUN \ RUN \
apk add --update git go make gcc musl-dev linux-headers && \
(cd go-ethereum && make geth) && \ (cd go-ethereum && make geth) && \
cp go-ethereum/build/bin/geth /geth && \ cp go-ethereum/build/bin/geth /geth && \
apk del git go make gcc musl-dev linux-headers && \ rm -rf /go-ethereum
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
FROM alpine:3.5
COPY --from=builder /geth /geth
EXPOSE 8545 EXPOSE 8545
EXPOSE 30303 EXPOSE 30303