Dockerfile 577 B

123456789101112131415
  1. FROM alpine:3.12
  2. # > All command-line options (except for '-datadir' and '-conf') may be specified in a configuration file
  3. ENV DATA_DIR_PATH=/var/lib/bitcoin
  4. ARG BITCOIN_CORE_PACKAGE_VERSION=0.19.1-r0
  5. # > Executing bitcoin-0.19.1-r0.post-install
  6. # > Generated random user / password / port in: /etc/bitcoin.conf
  7. RUN apk add --no-cache bitcoin=$BITCOIN_CORE_PACKAGE_VERSION \
  8. && rm /etc/bitcoin.conf \
  9. && mkdir "$DATA_DIR_PATH" \
  10. && chown -c bitcoin "$DATA_DIR_PATH"
  11. VOLUME $DATA_DIR_PATH
  12. USER bitcoin
  13. CMD ["sh", "-c", "exec bitcoind -datadir=\"$DATA_DIR_PATH\""]