You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
948 B

10 years ago
  1. # Pull base image.
  2. FROM golang:1.4.2-wheezy
  3. ENV user tendermint
  4. ENV data_root /data/tendermint
  5. # set user right away for determinism
  6. RUN groupadd -r $user \
  7. && useradd -r -s /bin/false -g $user $user
  8. # create directory for persistence and give our user ownership
  9. RUN mkdir -p $data_root \
  10. && chown -R $user:$user $data_root
  11. # Set the env variables to non-interactive
  12. ENV DEBIAN_FRONTEND noninteractive
  13. ENV DEBIAN_PRIORITY critical
  14. ENV DEBCONF_NOWARNINGS yes
  15. ENV TERM linux
  16. RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  17. # grab deps (gmp)
  18. RUN apt-get update && \
  19. apt-get install -y --no-install-recommends \
  20. libgmp3-dev && \
  21. rm -rf /var/lib/apt/lists/*
  22. # set the repo and install tendermint
  23. ENV repo /go/src/github.com/tendermint/tendermint
  24. ADD . $repo
  25. WORKDIR $repo
  26. RUN make
  27. # persist data, set user
  28. VOLUME $data_root
  29. USER tendermint
  30. ENV TMROOT $data_root
  31. # run tendermint
  32. CMD ["./run.sh"]