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.

54 lines
1.2 KiB

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 home directory for USER
  9. # Needed for nodejs/nom
  10. RUN mkdir -p /home/$USER \
  11. && chown -R $USER:$USER /home/$USER
  12. # Create directory for persistence and give our user ownership
  13. RUN mkdir -p $DATA_ROOT \
  14. && chown -R $USER:$USER $DATA_ROOT
  15. # Set the env variables to non-interactive
  16. ENV DEBIAN_FRONTEND noninteractive
  17. ENV DEBIAN_PRIORITY critical
  18. ENV DEBCONF_NOWARNINGS yes
  19. ENV TERM linux
  20. RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
  21. # Grab deps (git)
  22. RUN apt-get update && \
  23. apt-get install -y --no-install-recommends \
  24. git && \
  25. rm -rf /var/lib/apt/lists/*
  26. # Grab deps (node)
  27. RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -
  28. RUN apt-get update && \
  29. apt-get install -y --no-install-recommends \
  30. nodejs && \
  31. rm -rf /var/lib/apt/lists/*
  32. # Copy run.sh
  33. COPY ./run.sh $DATA_ROOT/run.sh
  34. RUN chmod +x $DATA_ROOT/run.sh
  35. # Persist data, set user
  36. WORKDIR $DATA_ROOT
  37. VOLUME $DATA_ROOT
  38. USER $USER
  39. ENV TMROOT $DATA_ROOT
  40. EXPOSE 46656
  41. EXPOSE 46657
  42. # Run tendermint
  43. CMD ["./run.sh"]