2019-03-29 07:57:16 -04:00
|
|
|
FROM alpine:3.9
|
|
|
|
LABEL maintainer="hello@tendermint.com"
|
2018-04-16 11:34:01 -04:00
|
|
|
|
2018-04-17 12:28:05 -04:00
|
|
|
# Tendermint will be looking for the genesis file in /tendermint/config/genesis.json
|
|
|
|
# (unless you change `genesis_file` in config.toml). You can put your config.toml and
|
|
|
|
# private validator file into /tendermint/config.
|
|
|
|
#
|
|
|
|
# The /tendermint/data dir is used by tendermint to store state.
|
2018-04-16 11:34:01 -04:00
|
|
|
ENV TMHOME /tendermint
|
2018-04-17 12:28:05 -04:00
|
|
|
|
|
|
|
# OS environment setup
|
|
|
|
# Set user right away for determinism, create directory for persistence and give our user ownership
|
|
|
|
# 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.
|
2018-04-16 11:34:01 -04:00
|
|
|
RUN apk update && \
|
|
|
|
apk upgrade && \
|
2018-04-17 12:28:05 -04:00
|
|
|
apk --no-cache add curl jq bash && \
|
2018-04-16 11:34:01 -04:00
|
|
|
addgroup tmuser && \
|
|
|
|
adduser -S -G tmuser tmuser -h "$TMHOME"
|
|
|
|
|
2018-04-17 12:28:05 -04:00
|
|
|
# Run the container with tmuser by default. (UID=100, GID=1000)
|
2018-04-16 11:34:01 -04:00
|
|
|
USER tmuser
|
2018-04-17 12:28:05 -04:00
|
|
|
|
|
|
|
# Expose the data directory as a volume since there's mutable state in there
|
2018-04-16 11:34:01 -04:00
|
|
|
VOLUME [ $TMHOME ]
|
2018-04-17 12:28:05 -04:00
|
|
|
|
2018-04-16 11:34:01 -04:00
|
|
|
WORKDIR $TMHOME
|
2018-04-17 12:28:05 -04:00
|
|
|
|
|
|
|
# p2p and rpc port
|
2018-06-12 02:25:52 -07:00
|
|
|
EXPOSE 26656 26657
|
2018-04-17 12:28:05 -04:00
|
|
|
|
2018-04-16 11:34:01 -04:00
|
|
|
ENTRYPOINT ["/usr/bin/tendermint"]
|
|
|
|
CMD ["node", "--moniker=`hostname`"]
|
|
|
|
STOPSIGNAL SIGTERM
|
2015-06-10 12:06:28 -04:00
|
|
|
|
2018-04-16 11:34:01 -04:00
|
|
|
ARG BINARY=tendermint
|
|
|
|
COPY $BINARY /usr/bin/tendermint
|