Dockerfile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM ubuntu:14.04.2
  2. ## Environment setup
  3. ENV HOME /root
  4. ENV GOPATH /root/go
  5. ENV PATH /root/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  6. RUN mkdir -p /root/go
  7. ENV DEBIAN_FRONTEND noninteractive
  8. ## Install base dependencies
  9. RUN apt-get update && apt-get upgrade -y
  10. RUN apt-get install -y git mercurial build-essential software-properties-common wget pkg-config libgmp3-dev libreadline6-dev libpcre3-dev libpcre++-dev
  11. ## Install Qt5.4.1 (not required for CLI)
  12. # RUN add-apt-repository ppa:beineri/opt-qt541-trusty -y
  13. # RUN apt-get update -y
  14. # RUN apt-get install -y qt54quickcontrols qt54webengine mesa-common-dev libglu1-mesa-dev
  15. # ENV PKG_CONFIG_PATH /opt/qt54/lib/pkgconfig
  16. # Install Golang
  17. RUN wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
  18. RUN tar -C /usr/local -xzf go*.tar.gz && go version
  19. # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes
  20. ADD https://api.github.com/repos/ethereum/go-ethereum/git/refs/heads/develop file_does_not_exist
  21. ## Fetch and install go-ethereum
  22. RUN mkdir -p $GOPATH/src/github.com/ethereum/
  23. RUN git clone https://github.com/ethereum/go-ethereum $GOPATH/src/github.com/ethereum/go-ethereum
  24. WORKDIR $GOPATH/src/github.com/ethereum/go-ethereum
  25. RUN git checkout develop
  26. RUN GOPATH=$GOPATH:$GOPATH/src/github.com/ethereum/go-ethereum/Godeps/_workspace go install -v ./cmd/geth
  27. ## Run & expose JSON RPC
  28. ENTRYPOINT ["geth", "-rpc=true", "-rpcport=8545"]
  29. EXPOSE 8545