github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/DOCKER/Dockerfile (about)

     1  FROM alpine:3.9
     2  LABEL maintainer="hello@tendermint.com"
     3  
     4  # Tendermint will be looking for the genesis file in /tendermint/config/genesis.json
     5  # (unless you change `genesis_file` in config.toml). You can put your config.toml and
     6  # private validator file into /tendermint/config.
     7  #
     8  # The /tendermint/data dir is used by tendermint to store state.
     9  ENV TMHOME /tendermint
    10  
    11  # OS environment setup
    12  # Set user right away for determinism, create directory for persistence and give our user ownership
    13  # jq and curl used for extracting `pub_key` from private validator while
    14  # deploying tendermint with Kubernetes. It is nice to have bash so the users
    15  # could execute bash commands.
    16  RUN apk update && \
    17      apk upgrade && \
    18      apk --no-cache add curl jq bash && \
    19      addgroup tmuser && \
    20      adduser -S -G tmuser tmuser -h "$TMHOME"
    21  
    22  # Run the container with tmuser by default. (UID=100, GID=1000)
    23  USER tmuser
    24  
    25  WORKDIR $TMHOME
    26  
    27  # p2p, rpc and prometheus port
    28  EXPOSE 26656 26657 26660
    29  
    30  ENTRYPOINT ["/usr/bin/tendermint"]
    31  CMD ["node"]
    32  STOPSIGNAL SIGTERM
    33  
    34  ARG BINARY=tendermint
    35  COPY $BINARY /usr/bin/tendermint
    36  
    37  # Create default configuration for docker run.
    38  RUN /usr/bin/tendermint init && \
    39      sed -i \
    40        -e 's/^proxy_app\s*=.*/proxy_app = "kvstore"/' \
    41        -e 's/^moniker\s*=.*/moniker = "dockernode"/' \
    42        -e 's/^addr_book_strict\s*=.*/addr_book_strict = false/' \
    43        -e 's/^timeout_commit\s*=.*/timeout_commit = "500ms"/' \
    44        -e 's/^index_all_tags\s*=.*/index_all_tags = true/' \
    45        -e 's,^laddr = "tcp://127.0.0.1:26657",laddr = "tcp://0.0.0.0:26657",' \
    46        -e 's/^prometheus\s*=.*/prometheus = true/' \
    47        $TMHOME/config/config.toml && \
    48      sed -i \
    49        -e 's/^\s*"chain_id":.*/  "chain_id": "dockerchain",/' \
    50        $TMHOME/config/genesis.json
    51  
    52  # Expose the data directory as a volume since there's mutable state in there
    53  VOLUME [ $TMHOME ]
    54