|
@ -4,11 +4,16 @@ FROM golang:1.4 |
|
|
ENV USER tmuser |
|
|
ENV USER tmuser |
|
|
ENV DATA_ROOT /data/tendermint |
|
|
ENV DATA_ROOT /data/tendermint |
|
|
|
|
|
|
|
|
# set user right away for determinism |
|
|
|
|
|
|
|
|
# Set user right away for determinism |
|
|
RUN groupadd -r $USER \ |
|
|
RUN groupadd -r $USER \ |
|
|
&& useradd -r -s /bin/false -g $USER $USER |
|
|
&& useradd -r -s /bin/false -g $USER $USER |
|
|
|
|
|
|
|
|
# create directory for persistence and give our user ownership |
|
|
|
|
|
|
|
|
# Create home directory for USER |
|
|
|
|
|
# Needed for nodejs/nom |
|
|
|
|
|
RUN mkdir -p /home/$USER \ |
|
|
|
|
|
&& chown -R $USER:$USER /home/$USER |
|
|
|
|
|
|
|
|
|
|
|
# Create directory for persistence and give our user ownership |
|
|
RUN mkdir -p $DATA_ROOT \ |
|
|
RUN mkdir -p $DATA_ROOT \ |
|
|
&& chown -R $USER:$USER $DATA_ROOT |
|
|
&& chown -R $USER:$USER $DATA_ROOT |
|
|
|
|
|
|
|
@ -19,28 +24,28 @@ 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 (git) |
|
|
|
|
|
|
|
|
# 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 \ |
|
|
git && \ |
|
|
git && \ |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
# grab deps (node) |
|
|
|
|
|
|
|
|
# Grab deps (node) |
|
|
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash - |
|
|
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash - |
|
|
RUN apt-get update && \ |
|
|
RUN apt-get update && \ |
|
|
apt-get install -y --no-install-recommends \ |
|
|
apt-get install -y --no-install-recommends \ |
|
|
nodejs && \ |
|
|
nodejs && \ |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
# copy run.sh |
|
|
|
|
|
|
|
|
# Copy run.sh |
|
|
COPY ./run.sh $DATA_ROOT/run.sh |
|
|
COPY ./run.sh $DATA_ROOT/run.sh |
|
|
RUN chmod +x $DATA_ROOT/run.sh |
|
|
RUN chmod +x $DATA_ROOT/run.sh |
|
|
|
|
|
|
|
|
# persist data, set user |
|
|
|
|
|
|
|
|
# Persist data, set user |
|
|
WORKDIR $DATA_ROOT |
|
|
WORKDIR $DATA_ROOT |
|
|
VOLUME $DATA_ROOT |
|
|
VOLUME $DATA_ROOT |
|
|
USER $USER |
|
|
USER $USER |
|
|
ENV TMROOT $DATA_ROOT |
|
|
ENV TMROOT $DATA_ROOT |
|
|
|
|
|
|
|
|
# run tendermint |
|
|
|
|
|
|
|
|
# Run tendermint |
|
|
CMD ["./run.sh"] |
|
|
CMD ["./run.sh"] |