2019-01-03 17:32:58 +03:00
|
|
|
FROM golang:1.11-alpine as builder
|
|
|
|
|
|
|
|
ARG VERSION
|
|
|
|
|
|
|
|
RUN apk add --update git gcc g++ linux-headers
|
|
|
|
RUN mkdir -p $GOPATH/src/github.com/ethereum && \
|
|
|
|
cd $GOPATH/src/github.com/ethereum && \
|
|
|
|
git clone https://github.com/ethersphere/go-ethereum && \
|
|
|
|
cd $GOPATH/src/github.com/ethereum/go-ethereum && \
|
|
|
|
git checkout ${VERSION} && \
|
|
|
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm && \
|
|
|
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/swarm-smoke && \
|
2019-02-12 10:34:08 +03:00
|
|
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/global-store && \
|
|
|
|
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth
|
2019-01-03 17:32:58 +03:00
|
|
|
|
|
|
|
|
2019-02-12 10:34:08 +03:00
|
|
|
FROM alpine:3.8 as swarm-smoke
|
2019-01-03 17:32:58 +03:00
|
|
|
WORKDIR /
|
2019-02-12 10:34:08 +03:00
|
|
|
COPY --from=builder /go/bin/swarm-smoke /
|
2019-01-03 17:32:58 +03:00
|
|
|
ADD run-smoke.sh /run-smoke.sh
|
2019-02-12 10:34:08 +03:00
|
|
|
ENTRYPOINT ["/run-smoke.sh"]
|
|
|
|
|
|
|
|
FROM alpine:3.8 as swarm-global-store
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=builder /go/bin/global-store /
|
|
|
|
ENTRYPOINT ["/global-store"]
|
|
|
|
|
|
|
|
FROM alpine:3.8 as swarm
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=builder /go/bin/swarm /go/bin/geth /
|
|
|
|
ADD run.sh /run.sh
|
2019-01-03 17:32:58 +03:00
|
|
|
ENTRYPOINT ["/run.sh"]
|