Skip to content

Commit 6cb7d52

Browse files
skylenetzelig
authored andcommitted
swarm/docker: add global-store and split docker images (ethereum#19038)
1 parent 27e3f96 commit 6cb7d52

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

swarm/docker/Dockerfile

+15-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ RUN mkdir -p $GOPATH/src/github.com/ethereum && \
1010
git checkout ${VERSION} && \
1111
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm && \
1212
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/swarm-smoke && \
13-
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth && \
14-
cp $GOPATH/bin/swarm /swarm && cp $GOPATH/bin/geth /geth && cp $GOPATH/bin/swarm-smoke /swarm-smoke
13+
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/swarm/global-store && \
14+
go install -ldflags "-X main.gitCommit=${VERSION}" ./cmd/geth
1515

1616

17-
# Release image with the required binaries and scripts
18-
FROM alpine:3.8
17+
FROM alpine:3.8 as swarm-smoke
1918
WORKDIR /
20-
COPY --from=builder /swarm /geth /swarm-smoke /
21-
ADD run.sh /run.sh
19+
COPY --from=builder /go/bin/swarm-smoke /
2220
ADD run-smoke.sh /run-smoke.sh
21+
ENTRYPOINT ["/run-smoke.sh"]
22+
23+
FROM alpine:3.8 as swarm-global-store
24+
WORKDIR /
25+
COPY --from=builder /go/bin/global-store /
26+
ENTRYPOINT ["/global-store"]
27+
28+
FROM alpine:3.8 as swarm
29+
WORKDIR /
30+
COPY --from=builder /go/bin/swarm /go/bin/geth /
31+
ADD run.sh /run.sh
2332
ENTRYPOINT ["/run.sh"]

0 commit comments

Comments
 (0)