tendermint/DOCKER/Dockerfile

46 lines
1.5 KiB
Docker
Raw Normal View History

2017-06-25 23:57:46 -07:00
FROM alpine:3.6
2015-06-10 09:06:28 -07:00
# This is the release of tendermint to pull in.
2017-12-08 09:34:34 -08:00
ENV TM_VERSION 0.13.0
ENV TM_SHA256SUM 36d773d4c2890addc61cc87a72c1e9c21c89516921b0defb0edfebde719b4b85
2015-06-10 09:06:28 -07: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 04:17:10 -07:00
ENV TMHOME $DATA_ROOT
2015-06-10 09:06:28 -07:00
# Set user right away for determinism
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
RUN mkdir -p $DATA_ROOT && \
chown -R tmuser:tmuser $DATA_ROOT
2015-06-10 09:06:28 -07: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 && \
2017-05-30 06:33:48 -07:00
wget https://s3-us-west-2.amazonaws.com/tendermint/binaries/tendermint/v${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip && \
2017-03-08 02:05:32 -08:00
echo "${TM_SHA256SUM} tendermint_${TM_VERSION}_linux_amd64.zip" | sha256sum -c && \
unzip -d /bin tendermint_${TM_VERSION}_linux_amd64.zip && \
apk del openssl && \
2017-03-08 02:05:32 -08:00
rm -f tendermint_${TM_VERSION}_linux_amd64.zip
# Expose the data directory as a volume since there's mutable state in there
2015-09-21 12:46:14 -07:00
VOLUME $DATA_ROOT
2015-06-10 09:06:28 -07:00
# p2p port
2016-02-05 20:46:45 -08:00
EXPOSE 46656
# rpc port
2016-02-05 20:46:45 -08:00
EXPOSE 46657
ENTRYPOINT ["tendermint"]
CMD ["node", "--moniker=`hostname`"]