Skip to content

Instantly share code, notes, and snippets.

@poctek
Created May 30, 2018 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poctek/ad9af1221d6faa8706281bff57ef5b5a to your computer and use it in GitHub Desktop.
Save poctek/ad9af1221d6faa8706281bff57ef5b5a to your computer and use it in GitHub Desktop.
# Build Geth in a stock Go builder container
FROM golang:1.9-alpine as builder
##FROM ubuntu
RUN apk add --update bash && rm -rf /var/cache/apk/*
RUN apk add --no-cache make gcc musl-dev linux-headers git bash
RUN go get -v github.com/ethereumproject/go-ethereum/...
WORKDIR $GOPATH/src/github.com/ethereumproject/go-ethereum
RUN ls -la
RUN ls -la cmd
ADD ./Makefile .
RUN cat Makefile
RUN apk add --no-cache curl file sudo
RUN curl -sSf https://static.rust-lang.org/rustup.sh | sh
RUN cargo -h
RUN make install_geth
# Pull Geth into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /etc/build/bin/geth /usr/local/bin/geth
ADD start.sh /root/start.sh
RUN apk add --no-cache bash
EXPOSE 6588 6589 30303 30303/udp 30304/udp
ENTRYPOINT /root/start.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment