aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/docker/Dockerfile
diff options
context:
space:
mode:
authorAnton Evangelatov <anton.evangelatov@gmail.com>2019-01-03 22:32:58 +0800
committerGitHub <noreply@github.com>2019-01-03 22:32:58 +0800
commit49975264a8d37aa9af1a2b71015059245c0c2e0b (patch)
tree83738c338fae0fc68332c71adf655f05f656e4da /swarm/docker/Dockerfile
parent1ea5279d5d7cd44ab18d72a2d26f1ad03b8d2b5e (diff)
downloadgo-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.tar
go-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.tar.gz
go-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.tar.bz2
go-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.tar.lz
go-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.tar.xz
go-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.tar.zst
go-tangerine-49975264a8d37aa9af1a2b71015059245c0c2e0b.zip
swarm/docker: Dockerfile for swarm:edge docker image (#18386)
Diffstat (limited to 'swarm/docker/Dockerfile')
-rw-r--r--swarm/docker/Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/swarm/docker/Dockerfile b/swarm/docker/Dockerfile
new file mode 100644
index 000000000..1ee4e9734
--- /dev/null
+++ b/swarm/docker/Dockerfile
@@ -0,0 +1,23 @@
+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 && \
+ 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
+
+
+# Release image with the required binaries and scripts
+FROM alpine:3.8
+WORKDIR /
+COPY --from=builder /swarm /geth /swarm-smoke /
+ADD run.sh /run.sh
+ADD run-smoke.sh /run-smoke.sh
+ENTRYPOINT ["/run.sh"]