2018-04-02 16:55:43 +02:00
|
|
|
FROM alpine:3.7
|
2015-06-10 12:06:28 -04:00
|
|
|
|
2017-01-27 21:10:13 +04:00
|
|
|
# This is the release of tendermint to pull in.
|
2018-04-02 16:56:07 +02:00
|
|
|
ENV TM_VERSION 0.17.1
|
|
|
|
ENV TM_SHA256SUM d57008c63d2d9176861137e38ed203da486febf20ae7d388fb810a75afff8f24
|
2015-06-10 12:06:28 -04:00
|
|
|
|
2017-01-27 21:10:13 +04:00
|
|
|
# Tendermint will be looking for genesis file in /tendermint (unless you change
|
|
|
|
# `genesis_file` in config.toml). You can put your config.toml and private
|
|
|
|
# validator file into /tendermint.
|
|
|
|
#
|
|
|
|
# The /tendermint/data dir is used by tendermint to store state.
|
|
|
|
ENV DATA_ROOT /tendermint
|
2017-03-27 15:17:10 +04:00
|
|
|
ENV TMHOME $DATA_ROOT
|
2015-06-10 12:06:28 -04:00
|
|
|
|
2017-01-27 21:10:13 +04:00
|
|
|
# Set user right away for determinism
|
2017-02-05 17:58:08 +04:00
|
|
|
RUN addgroup tmuser && \
|
|
|
|
adduser -S -G tmuser tmuser
|
2016-02-04 22:11:47 -08:00
|
|
|
|
|
|
|
# Create directory for persistence and give our user ownership
|
2017-01-27 21:10:13 +04:00
|
|
|
RUN mkdir -p $DATA_ROOT && \
|
|
|
|
chown -R tmuser:tmuser $DATA_ROOT
|
2015-06-10 12:06:28 -04:00
|
|
|
|
2017-02-05 17:58:08 +04:00
|
|
|
# jq and curl used for extracting `pub_key` from private validator while
|
|
|
|
# deploying tendermint with Kubernetes. It is nice to have bash so the users
|
|
|
|
# could execute bash commands.
|
|
|
|
RUN apk add --no-cache bash curl jq
|
|
|
|
|
|
|
|
RUN apk add --no-cache openssl && \
|
2018-04-02 16:56:07 +02:00
|
|
|
wget https://github.com/tendermint/tendermint/releases/download/v${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip && \
|
2017-03-08 14:05:32 +04:00
|
|
|
echo "${TM_SHA256SUM} tendermint_${TM_VERSION}_linux_amd64.zip" | sha256sum -c && \
|
|
|
|
unzip -d /bin tendermint_${TM_VERSION}_linux_amd64.zip && \
|
2017-02-05 17:58:08 +04:00
|
|
|
apk del openssl && \
|
2017-03-08 14:05:32 +04:00
|
|
|
rm -f tendermint_${TM_VERSION}_linux_amd64.zip
|
2017-01-27 21:10:13 +04:00
|
|
|
|
|
|
|
# Expose the data directory as a volume since there's mutable state in there
|
2015-09-21 19:46:14 +00:00
|
|
|
VOLUME $DATA_ROOT
|
2015-06-10 12:06:28 -04:00
|
|
|
|
2017-02-05 17:58:08 +04:00
|
|
|
# p2p port
|
2016-02-05 23:46:45 -05:00
|
|
|
EXPOSE 46656
|
2017-02-05 17:58:08 +04:00
|
|
|
# rpc port
|
2016-02-05 23:46:45 -05:00
|
|
|
EXPOSE 46657
|
|
|
|
|
2017-01-27 21:10:13 +04:00
|
|
|
ENTRYPOINT ["tendermint"]
|
|
|
|
|
2017-06-26 12:05:08 +04:00
|
|
|
CMD ["node", "--moniker=`hostname`"]
|