tendermint/DOCKER/Dockerfile

40 lines
893 B
Docker
Raw Normal View History

2015-06-10 09:06:28 -07:00
# Pull base image.
FROM golang:1.4
2015-06-10 09:06:28 -07:00
2015-09-21 12:46:14 -07:00
ENV USER tmuser
ENV DATA_ROOT /data/tendermint
2015-06-10 09:06:28 -07:00
# set user right away for determinism
2015-09-21 12:46:14 -07:00
RUN groupadd -r $USER \
&& useradd -r -s /bin/false -g $USER $USER
2015-06-10 09:06:28 -07:00
# create directory for persistence and give our user ownership
2015-09-21 12:46:14 -07:00
RUN mkdir -p $DATA_ROOT \
&& chown -R $USER:$USER $DATA_ROOT
2015-06-10 09:06:28 -07:00
# Set the env variables to non-interactive
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_PRIORITY critical
ENV DEBCONF_NOWARNINGS yes
ENV TERM linux
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
2015-09-21 12:46:14 -07:00
# grab deps (git)
2015-06-10 09:06:28 -07:00
RUN apt-get update && \
apt-get install -y --no-install-recommends \
2015-09-21 12:46:14 -07:00
git && \
2015-06-10 09:06:28 -07:00
rm -rf /var/lib/apt/lists/*
2015-09-21 12:46:14 -07:00
# copy run.sh
COPY ./run.sh $DATA_ROOT/run.sh
RUN chmod +x $DATA_ROOT/run.sh
2015-06-10 09:06:28 -07:00
# persist data, set user
2015-09-21 12:46:14 -07:00
WORKDIR $DATA_ROOT
VOLUME $DATA_ROOT
USER $USER
ENV TMROOT $DATA_ROOT
2015-06-10 09:06:28 -07:00
# run tendermint
2015-09-21 12:46:14 -07:00
CMD ["./run.sh"]