Skip to content

Commit

Permalink
swarm/docker: add global-store and split docker images (ethereum#19038)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylenet authored and zelig committed Feb 12, 2019
1 parent 27e3f96 commit 6cb7d52
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions swarm/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ RUN mkdir -p $GOPATH/src/github.com/ethereum && \
git checkout ${VERSION} && \
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm && \
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/swarm-smoke && \
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth && \
cp $GOPATH/bin/swarm /swarm && cp $GOPATH/bin/geth /geth && cp $GOPATH/bin/swarm-smoke /swarm-smoke
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/global-store && \
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth


# Release image with the required binaries and scripts
FROM alpine:3.8
FROM alpine:3.8 as swarm-smoke
WORKDIR /
COPY --from=builder /swarm /geth /swarm-smoke /
ADD run.sh /run.sh
COPY --from=builder /go/bin/swarm-smoke /
ADD run-smoke.sh /run-smoke.sh
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
ENTRYPOINT ["/run.sh"]

0 comments on commit 6cb7d52

Please sign in to comment.