From 9b62e31e0aeea49ee51c8d54d6deb58891d08fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 1 Aug 2018 14:13:47 -0400 Subject: [PATCH] add a Dockerfile for a swarm image --- swarm/Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 swarm/Dockerfile diff --git a/swarm/Dockerfile b/swarm/Dockerfile new file mode 100644 index 0000000..52df537 --- /dev/null +++ b/swarm/Dockerfile @@ -0,0 +1,32 @@ +FROM alpine:3.8 as builder + +ENV GOLANG_VERSION=1.10.3 +ENV ETHEREUM_REPO=https://github.com/ethereum/go-ethereum + +# Deps +RUN apk add --no-cache git make go linux-headers gcc musl-dev +ENV GOPATH=/go/ + +RUN mkdir -p "${GOPATH}/src/github.com/ethereum" && \ + git clone "$ETHEREUM_REPO" "${GOPATH}/src/github.com/ethereum/go-ethereum" + +WORKDIR "${GOPATH}/src/github.com/ethereum/go-ethereum" + +RUN go get github.com/ethereum/go-ethereum +RUN go install ./cmd/geth +RUN go install ./cmd/swarm + +# Copy the binary to the second image +FROM alpine:latest + +LABEL source="https://github.com/status-im/infra-utils" +LABEL description="Swarm docker image created for Status.im" +LABEL maintainer="support@status.im" + +COPY --from=builder /go/bin/geth /bin/geth +COPY --from=builder /go/bin/swarm /bin/swarm + +ENTRYPOINT ["/bin/swarm"] +CMD ["--help"] + +EXPOSE 30399