swarm/docker: Dockerfile for swarm:edge docker image (#18386)
This commit is contained in:
committed by
GitHub
parent
1ea5279d5d
commit
49975264a8
23
swarm/docker/Dockerfile
Normal file
23
swarm/docker/Dockerfile
Normal file
@@ -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"]
|
Reference in New Issue
Block a user