bitbucket.org/number571/tendermint@v0.8.14/DOCKER/Dockerfile (about)

     1  # stage 1 Generate Tendermint Binary
     2  FROM golang:1.16-alpine as builder
     3  RUN apk update && \
     4      apk upgrade && \
     5      apk --no-cache add make
     6  COPY / /tendermint
     7  WORKDIR /tendermint
     8  RUN make build-linux
     9  
    10  # stage 2
    11  FROM golang:1.15-alpine
    12  LABEL maintainer="hello@tendermint.com"
    13  
    14  # Tendermint will be looking for the genesis file in /tendermint/config/genesis.json
    15  # (unless you change `genesis_file` in config.toml). You can put your config.toml and
    16  # private validator file into /tendermint/config.
    17  #
    18  # The /tendermint/data dir is used by tendermint to store state.
    19  ENV TMHOME /tendermint
    20  
    21  # OS environment setup
    22  # Set user right away for determinism, create directory for persistence and give our user ownership
    23  # jq and curl used for extracting `pub_key` from private validator while
    24  # deploying tendermint with Kubernetes. It is nice to have bash so the users
    25  # could execute bash commands.
    26  RUN apk update && \
    27      apk upgrade && \
    28      apk --no-cache add curl jq bash && \
    29      addgroup tmuser && \
    30      adduser -S -G tmuser tmuser -h "$TMHOME"
    31  
    32  # Run the container with tmuser by default. (UID=100, GID=1000)
    33  USER tmuser
    34  
    35  WORKDIR $TMHOME
    36  
    37  # p2p, rpc and prometheus port
    38  EXPOSE 26656 26657 26660
    39  
    40  STOPSIGNAL SIGTERM
    41  
    42  COPY --from=builder /tendermint/build/tendermint /usr/bin/tendermint
    43  
    44  # You can overwrite these before the first run to influence
    45  # config.json and genesis.json. Additionally, you can override
    46  # CMD to add parameters to `tendermint node`.
    47  ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain
    48  
    49  COPY ./DOCKER/docker-entrypoint.sh /usr/local/bin/
    50  
    51  ENTRYPOINT ["docker-entrypoint.sh"]
    52  CMD ["start"]
    53  
    54  # Expose the data directory as a volume since there's mutable state in there
    55  VOLUME [ "$TMHOME" ]
    56