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.

39 lines
893 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. # Pull base image.
  2. FROM golang:1.4
  3. ENV USER tmuser
  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 (git)
  18. RUN apt-get update && \
  19. apt-get install -y --no-install-recommends \
  20. git && \
  21. rm -rf /var/lib/apt/lists/*
  22. # copy run.sh
  23. COPY ./run.sh $DATA_ROOT/run.sh
  24. RUN chmod +x $DATA_ROOT/run.sh
  25. # persist data, set user
  26. WORKDIR $DATA_ROOT
  27. VOLUME $DATA_ROOT
  28. USER $USER
  29. ENV TMROOT $DATA_ROOT
  30. # run tendermint
  31. CMD ["./run.sh"]