|
@ -1,16 +1,16 @@ |
|
|
# Pull base image. |
|
|
# Pull base image. |
|
|
FROM golang:1.4 |
|
|
FROM golang:1.4 |
|
|
|
|
|
|
|
|
ENV user tendermint |
|
|
|
|
|
ENV data_root /data/tendermint |
|
|
|
|
|
|
|
|
ENV USER tmuser |
|
|
|
|
|
ENV DATA_ROOT /data/tendermint |
|
|
|
|
|
|
|
|
# set user right away for determinism |
|
|
# set user right away for determinism |
|
|
RUN groupadd -r $user \ |
|
|
|
|
|
&& useradd -r -s /bin/false -g $user $user |
|
|
|
|
|
|
|
|
RUN groupadd -r $USER \ |
|
|
|
|
|
&& useradd -r -s /bin/false -g $USER $USER |
|
|
|
|
|
|
|
|
# create directory for persistence and give our user ownership |
|
|
# create directory for persistence and give our user ownership |
|
|
RUN mkdir -p $data_root \ |
|
|
|
|
|
&& chown -R $user:$user $data_root |
|
|
|
|
|
|
|
|
RUN mkdir -p $DATA_ROOT \ |
|
|
|
|
|
&& chown -R $USER:$USER $DATA_ROOT |
|
|
|
|
|
|
|
|
# Set the env variables to non-interactive |
|
|
# Set the env variables to non-interactive |
|
|
ENV DEBIAN_FRONTEND noninteractive |
|
|
ENV DEBIAN_FRONTEND noninteractive |
|
@ -19,23 +19,21 @@ ENV DEBCONF_NOWARNINGS yes |
|
|
ENV TERM linux |
|
|
ENV TERM linux |
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections |
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections |
|
|
|
|
|
|
|
|
# grab deps (gmp) |
|
|
|
|
|
|
|
|
# grab deps (git) |
|
|
RUN apt-get update && \ |
|
|
RUN apt-get update && \ |
|
|
apt-get install -y --no-install-recommends \ |
|
|
apt-get install -y --no-install-recommends \ |
|
|
libgmp3-dev && \ |
|
|
|
|
|
|
|
|
git && \ |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
# set the repo and install tendermint |
|
|
|
|
|
ENV repo /go/src/github.com/tendermint/tendermint |
|
|
|
|
|
ADD . $repo |
|
|
|
|
|
WORKDIR $repo |
|
|
|
|
|
RUN make |
|
|
|
|
|
|
|
|
# copy run.sh |
|
|
|
|
|
COPY ./run.sh $DATA_ROOT/run.sh |
|
|
|
|
|
RUN chmod +x $DATA_ROOT/run.sh |
|
|
|
|
|
|
|
|
# persist data, set user |
|
|
# persist data, set user |
|
|
VOLUME $data_root |
|
|
|
|
|
USER tendermint |
|
|
|
|
|
ENV TMROOT $data_root |
|
|
|
|
|
|
|
|
WORKDIR $DATA_ROOT |
|
|
|
|
|
VOLUME $DATA_ROOT |
|
|
|
|
|
USER $USER |
|
|
|
|
|
ENV TMROOT $DATA_ROOT |
|
|
|
|
|
|
|
|
# run tendermint |
|
|
# run tendermint |
|
|
CMD ["./DOCKER/run.sh"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMD ["./run.sh"] |