From 72b8e9783514b6c97279dc16d551fc3ae6256fc8 Mon Sep 17 00:00:00 2001 From: Andre Fernandes Date: Mon, 22 May 2017 18:04:09 -0300 Subject: [PATCH] multi-stage build --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae6870e311..c051dfb991 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -FROM alpine:3.5 +FROM vertigo/go-builder as builder ADD . /go-ethereum RUN \ - apk add --update git go make gcc musl-dev linux-headers && \ (cd go-ethereum && make geth) && \ cp go-ethereum/build/bin/geth /geth && \ - apk del git go make gcc musl-dev linux-headers && \ - rm -rf /go-ethereum && rm -rf /var/cache/apk/* + rm -rf /go-ethereum + +FROM alpine:3.5 + +COPY --from=builder /geth /geth EXPOSE 8545 EXPOSE 30303