mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
docker: add extended Dockerfile
This commit is contained in:
parent
784aa83942
commit
0e2bb53460
1 changed files with 25 additions and 0 deletions
25
Dockerfile.extended
Normal file
25
Dockerfile.extended
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Build Geth in a stock Go builder container
|
||||||
|
FROM golang:1.10-alpine as builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache make gcc musl-dev linux-headers
|
||||||
|
|
||||||
|
ADD . /go-ethereum
|
||||||
|
RUN cd /go-ethereum && make all
|
||||||
|
|
||||||
|
# Pull all binaries into a second stage deploy alpine container
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
|
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
|
||||||
|
|
||||||
|
# Pull golang directory and set related environment variables
|
||||||
|
COPY --from=builder /usr/local/go /usr/local/go
|
||||||
|
ENV GOPATH /go
|
||||||
|
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
||||||
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
||||||
|
|
||||||
|
# Install dependencies for `go get`
|
||||||
|
RUN apk update && apk upgrade && \
|
||||||
|
apk add --no-cache bash git openssh mercurial bzr
|
||||||
|
|
||||||
|
EXPOSE 8545 8546 30303 30303/udp
|
||||||
Loading…
Reference in a new issue