├── 22 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 23 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 24 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 0.11 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ ├── patches │ │ └── warnings.patch │ └── Dockerfile └── Dockerfile ├── 0.12 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ ├── patches │ │ ├── boost.patch │ │ └── warnings.patch │ └── Dockerfile └── Dockerfile ├── 0.13 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ ├── patches │ │ ├── warnings.patch │ │ └── boost.patch │ └── Dockerfile └── Dockerfile ├── 0.16 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 0.17 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 0.18 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 0.19 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 0.20 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── 0.21 ├── docker-entrypoint.sh ├── alpine │ ├── docker-entrypoint.sh │ └── Dockerfile └── Dockerfile ├── LICENSE ├── .github └── workflows │ └── build.yaml └── README.md /0.11/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.12/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.13/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.16/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.17/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.18/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.19/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.20/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.21/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /22/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /23/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /24/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec gosu bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /22/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /23/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /24/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.11/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.12/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.13/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.16/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.17/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.18/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.19/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.20/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /0.21/alpine/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then 5 | usermod -u "$UID" bitcoin 6 | fi 7 | 8 | if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then 9 | groupmod -g "$GID" bitcoin 10 | fi 11 | 12 | echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)" 13 | 14 | if [ $(echo "$1" | cut -c1) = "-" ]; then 15 | echo "$0: assuming arguments for bitcoind" 16 | 17 | set -- bitcoind "$@" 18 | fi 19 | 20 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 21 | mkdir -p "$BITCOIN_DATA" 22 | chmod 700 "$BITCOIN_DATA" 23 | # Fix permissions for home dir. 24 | chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)" 25 | # Fix permissions for bitcoin data dir. 26 | chown -R bitcoin:bitcoin "$BITCOIN_DATA" 27 | 28 | echo "$0: setting data directory to $BITCOIN_DATA" 29 | 30 | set -- "$@" -datadir="$BITCOIN_DATA" 31 | fi 32 | 33 | if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then 34 | echo 35 | exec su-exec bitcoin "$@" 36 | fi 37 | 38 | echo 39 | exec "$@" 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Rui Marinho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /0.11/alpine/patches/warnings.patch: -------------------------------------------------------------------------------- 1 | diff --git Makefile.am Makefile.am 2 | index ab68d8fa6..4600e5696 100644 3 | --- Makefile.am 4 | +++ Makefile.am 5 | @@ -1,5 +1,6 @@ 6 | ACLOCAL_AMFLAGS = -I build-aux/m4 7 | SUBDIRS = src 8 | +ARFLAGS=cr 9 | .PHONY: deploy FORCE 10 | 11 | GZIP_ENV="-9n" 12 | diff --git configure.ac configure.ac 13 | index 5debd219e..da7754042 100644 14 | --- configure.ac 15 | +++ configure.ac 16 | @@ -1,5 +1,6 @@ 17 | dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) 18 | AC_PREREQ([2.60]) 19 | +ARFLAGS=cr 20 | define(_CLIENT_VERSION_MAJOR, 0) 21 | define(_CLIENT_VERSION_MINOR, 11) 22 | define(_CLIENT_VERSION_REVISION, 2) 23 | diff --git src/compat.h src/compat.h 24 | index 20c2a2514..feaa544e2 100644 25 | --- src/compat.h 26 | +++ src/compat.h 27 | @@ -32,7 +32,7 @@ 28 | #include 29 | #include 30 | #else 31 | -#include 32 | +#include 33 | #include 34 | #include 35 | #include 36 | diff --git src/secp256k1/configure.ac src/secp256k1/configure.ac 37 | index 3dc182951..8d85fb225 100644 38 | --- src/secp256k1/configure.ac 39 | +++ src/secp256k1/configure.ac 40 | @@ -1,4 +1,5 @@ 41 | AC_PREREQ([2.60]) 42 | +AR_FLAGS=cr 43 | AC_INIT([libsecp256k1],[0.1]) 44 | AC_CONFIG_AUX_DIR([build-aux]) 45 | AC_CONFIG_MACRO_DIR([build-aux/m4]) 46 | /bitcoin-0.11.2 # 47 | -------------------------------------------------------------------------------- /0.12/alpine/patches/boost.patch: -------------------------------------------------------------------------------- 1 | diff --git src/txmempool.h src/txmempool.h 2 | index 5997346b0..c7bc73a09 100644 3 | --- src/txmempool.h 4 | +++ src/txmempool.h 5 | @@ -201,7 +201,7 @@ struct mempoolentry_txid 6 | class CompareTxMemPoolEntryByDescendantScore 7 | { 8 | public: 9 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 10 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 11 | { 12 | bool fUseADescendants = UseDescendantScore(a); 13 | bool fUseBDescendants = UseDescendantScore(b); 14 | @@ -223,7 +223,7 @@ public: 15 | } 16 | 17 | // Calculate which score to use for an entry (avoiding division). 18 | - bool UseDescendantScore(const CTxMemPoolEntry &a) 19 | + bool UseDescendantScore(const CTxMemPoolEntry &a) const 20 | { 21 | double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants(); 22 | double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize(); 23 | @@ -238,7 +238,7 @@ public: 24 | class CompareTxMemPoolEntryByScore 25 | { 26 | public: 27 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 28 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 29 | { 30 | double f1 = (double)a.GetModifiedFee() * b.GetTxSize(); 31 | double f2 = (double)b.GetModifiedFee() * a.GetTxSize(); 32 | @@ -252,7 +252,7 @@ public: 33 | class CompareTxMemPoolEntryByEntryTime 34 | { 35 | public: 36 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 37 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 38 | { 39 | return a.GetTime() < b.GetTime(); 40 | } 41 | -------------------------------------------------------------------------------- /0.11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ENV BITCOIN_VERSION=0.11.2 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && for key in \ 23 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 24 | ; do \ 25 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 26 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 27 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 28 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 29 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 30 | done \ 31 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 32 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-linux64.tar.gz \ 33 | && gpg --verify SHA256SUMS.asc \ 34 | && grep " bitcoin-${BITCOIN_VERSION}-linux64.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 35 | && tar -xzf *.tar.gz -C /opt \ 36 | && rm *.tar.gz *.asc 37 | 38 | COPY docker-entrypoint.sh /entrypoint.sh 39 | 40 | VOLUME ["/home/bitcoin/.bitcoin"] 41 | 42 | EXPOSE 8332 8333 18332 18333 18444 43 | 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | CMD ["bitcoind"] 47 | -------------------------------------------------------------------------------- /0.12/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ENV BITCOIN_VERSION=0.12.1 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && for key in \ 23 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 24 | ; do \ 25 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 26 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 27 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 28 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 29 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 30 | done \ 31 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 32 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-linux64.tar.gz \ 33 | && gpg --verify SHA256SUMS.asc \ 34 | && grep " bitcoin-${BITCOIN_VERSION}-linux64.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 35 | && tar -xzf *.tar.gz -C /opt \ 36 | && rm *.tar.gz *.asc 37 | 38 | COPY docker-entrypoint.sh /entrypoint.sh 39 | 40 | VOLUME ["/home/bitcoin/.bitcoin"] 41 | 42 | EXPOSE 8332 8333 18332 18333 18444 43 | 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 47 | 48 | CMD ["bitcoind"] 49 | -------------------------------------------------------------------------------- /0.13/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ENV BITCOIN_VERSION=0.13.2 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && for key in \ 23 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 24 | ; do \ 25 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 26 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 27 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 28 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 29 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 30 | done \ 31 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 32 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \ 33 | && gpg --verify SHA256SUMS.asc \ 34 | && grep " bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 35 | && tar -xzf *.tar.gz -C /opt \ 36 | && rm *.tar.gz *.asc 37 | 38 | COPY docker-entrypoint.sh /entrypoint.sh 39 | 40 | VOLUME ["/home/bitcoin/.bitcoin"] 41 | 42 | EXPOSE 8332 8333 18332 18333 18444 43 | 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 47 | 48 | CMD ["bitcoind"] 49 | -------------------------------------------------------------------------------- /0.16/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ENV BITCOIN_VERSION=0.16.3 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && for key in \ 23 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 24 | ; do \ 25 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 26 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 27 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 28 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 29 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 30 | done \ 31 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 32 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \ 33 | && gpg --verify SHA256SUMS.asc \ 34 | && grep " bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 35 | && tar -xzf *.tar.gz -C /opt \ 36 | && rm *.tar.gz *.asc 37 | 38 | COPY docker-entrypoint.sh /entrypoint.sh 39 | 40 | VOLUME ["/home/bitcoin/.bitcoin"] 41 | 42 | EXPOSE 8332 8333 18332 18333 18443 18444 43 | 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 47 | 48 | CMD ["bitcoind"] 49 | -------------------------------------------------------------------------------- /0.17/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ENV BITCOIN_VERSION=0.17.1 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && for key in \ 23 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 24 | ; do \ 25 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 26 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 27 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 28 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 29 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 30 | done \ 31 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 32 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \ 33 | && gpg --verify SHA256SUMS.asc \ 34 | && grep " bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 35 | && tar -xzf *.tar.gz -C /opt \ 36 | && rm *.tar.gz *.asc 37 | 38 | COPY docker-entrypoint.sh /entrypoint.sh 39 | 40 | VOLUME ["/home/bitcoin/.bitcoin"] 41 | 42 | EXPOSE 8332 8333 18332 18333 18443 18444 43 | 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 47 | 48 | CMD ["bitcoind"] 49 | -------------------------------------------------------------------------------- /0.18/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ENV BITCOIN_VERSION=0.18.1 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && for key in \ 23 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 24 | ; do \ 25 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 26 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 27 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 28 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 29 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 30 | done \ 31 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 32 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \ 33 | && gpg --verify SHA256SUMS.asc \ 34 | && grep " bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 35 | && tar -xzf *.tar.gz -C /opt \ 36 | && rm *.tar.gz *.asc 37 | 38 | COPY docker-entrypoint.sh /entrypoint.sh 39 | 40 | VOLUME ["/home/bitcoin/.bitcoin"] 41 | 42 | EXPOSE 8332 8333 18332 18333 18443 18444 43 | 44 | ENTRYPOINT ["/entrypoint.sh"] 45 | 46 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 47 | 48 | CMD ["bitcoind"] 49 | -------------------------------------------------------------------------------- /0.12/alpine/patches/warnings.patch: -------------------------------------------------------------------------------- 1 | diff --git configure.ac configure.ac 2 | index e2056ee75..679d97506 100644 3 | --- configure.ac 4 | +++ configure.ac 5 | @@ -1,5 +1,6 @@ 6 | dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) 7 | AC_PREREQ([2.60]) 8 | +ARFLAGS=cr 9 | define(_CLIENT_VERSION_MAJOR, 0) 10 | define(_CLIENT_VERSION_MINOR, 12) 11 | define(_CLIENT_VERSION_REVISION, 1) 12 | diff --git src/Makefile.am src/Makefile.am 13 | index 52316a9fd..54cfd150b 100644 14 | --- src/Makefile.am 15 | +++ src/Makefile.am 16 | @@ -1,5 +1,5 @@ 17 | DIST_SUBDIRS = secp256k1 univalue 18 | - 19 | +ARFLAGS=cr 20 | AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) 21 | AM_CXXFLAGS = $(HARDENED_CXXFLAGS) 22 | AM_CPPFLAGS = $(HARDENED_CPPFLAGS) 23 | diff --git src/compat.h src/compat.h 24 | index 1225ea18e..4f5d28472 100644 25 | --- src/compat.h 26 | +++ src/compat.h 27 | @@ -32,7 +32,7 @@ 28 | #include 29 | #include 30 | #else 31 | -#include 32 | +#include 33 | #include 34 | #include 35 | #include 36 | diff --git src/secp256k1/configure.ac src/secp256k1/configure.ac 37 | index 786d8dcfb..109b84b85 100644 38 | --- src/secp256k1/configure.ac 39 | +++ src/secp256k1/configure.ac 40 | @@ -18,6 +18,7 @@ AC_PATH_TOOL(AR, ar) 41 | AC_PATH_TOOL(RANLIB, ranlib) 42 | AC_PATH_TOOL(STRIP, strip) 43 | AX_PROG_CC_FOR_BUILD 44 | +AR_FLAGS=cr 45 | 46 | if test "x$CFLAGS" = "x"; then 47 | CFLAGS="-O3 -g" 48 | diff --git src/univalue/configure.ac src/univalue/configure.ac 49 | index 0515b632b..ae7a15792 100644 50 | --- src/univalue/configure.ac 51 | +++ src/univalue/configure.ac 52 | @@ -21,6 +21,7 @@ dnl make the compilation flags quiet unless V=1 is used 53 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 54 | 55 | AC_PREREQ(2.60) 56 | +AR_FLAGS=cr 57 | AC_CONFIG_SRCDIR([lib/univalue.cpp]) 58 | AC_CONFIG_AUX_DIR([build-aux]) 59 | AC_CONFIG_MACRO_DIR([build-aux/m4]) 60 | -------------------------------------------------------------------------------- /0.13/alpine/patches/warnings.patch: -------------------------------------------------------------------------------- 1 | diff --git configure.ac configure.ac 2 | index d4e775aef..6adc82efa 100644 3 | --- configure.ac 4 | +++ configure.ac 5 | @@ -1,5 +1,6 @@ 6 | dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) 7 | AC_PREREQ([2.60]) 8 | +ARFLAGS=cr 9 | define(_CLIENT_VERSION_MAJOR, 0) 10 | define(_CLIENT_VERSION_MINOR, 13) 11 | define(_CLIENT_VERSION_REVISION, 2) 12 | diff --git src/Makefile.am src/Makefile.am 13 | index 1e033de9d..f75ef065d 100644 14 | --- src/Makefile.am 15 | +++ src/Makefile.am 16 | @@ -3,6 +3,7 @@ 17 | # file COPYING or http://www.opensource.org/licenses/mit-license.php. 18 | 19 | DIST_SUBDIRS = secp256k1 univalue 20 | +ARFLAGS=cr 21 | 22 | AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) 23 | AM_CXXFLAGS = $(HARDENED_CXXFLAGS) 24 | diff --git src/compat.h src/compat.h 25 | index 2578d6d34..32319359b 100644 26 | --- src/compat.h 27 | +++ src/compat.h 28 | @@ -32,7 +32,7 @@ 29 | #include 30 | #include 31 | #else 32 | -#include 33 | +#include 34 | #include 35 | #include 36 | #include 37 | diff --git src/secp256k1/configure.ac src/secp256k1/configure.ac 38 | index ec50ffe3a..f18e34a97 100644 39 | --- src/secp256k1/configure.ac 40 | +++ src/secp256k1/configure.ac 41 | @@ -18,6 +18,7 @@ AC_PATH_TOOL(AR, ar) 42 | AC_PATH_TOOL(RANLIB, ranlib) 43 | AC_PATH_TOOL(STRIP, strip) 44 | AX_PROG_CC_FOR_BUILD 45 | +AR_FLAGS=cr 46 | 47 | if test "x$CFLAGS" = "x"; then 48 | CFLAGS="-O3 -g" 49 | diff --git src/univalue/configure.ac src/univalue/configure.ac 50 | index 93d3ba945..7d79f6896 100644 51 | --- src/univalue/configure.ac 52 | +++ src/univalue/configure.ac 53 | @@ -21,6 +21,7 @@ dnl make the compilation flags quiet unless V=1 is used 54 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 55 | 56 | AC_PREREQ(2.60) 57 | +AR_FLAGS=cr 58 | AC_CONFIG_SRCDIR([lib/univalue.cpp]) 59 | AC_CONFIG_AUX_DIR([build-aux]) 60 | AC_CONFIG_MACRO_DIR([build-aux/m4]) 61 | -------------------------------------------------------------------------------- /0.21/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN useradd --system --user-group bitcoin \ 11 | && apt-get update -y \ 12 | && apt-get install -y curl gnupg gosu \ 13 | && apt-get clean \ 14 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 15 | 16 | ARG TARGETPLATFORM 17 | ENV BITCOIN_VERSION=0.21.1 18 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 19 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 20 | 21 | RUN set -ex \ 22 | && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ 23 | && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ 24 | && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \ 25 | && for key in \ 26 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 27 | ; do \ 28 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 29 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 30 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 31 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 32 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 33 | done \ 34 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \ 35 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 36 | && gpg --verify SHA256SUMS.asc \ 37 | && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS.asc | sha256sum -c - \ 38 | && tar -xzf *.tar.gz -C /opt \ 39 | && rm *.tar.gz *.asc \ 40 | && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt 41 | 42 | COPY docker-entrypoint.sh /entrypoint.sh 43 | 44 | VOLUME ["/home/bitcoin/.bitcoin"] 45 | 46 | EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332 47 | 48 | 49 | ENTRYPOINT ["/entrypoint.sh"] 50 | 51 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 52 | 53 | CMD ["bitcoind"] 54 | -------------------------------------------------------------------------------- /0.19/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ARG TARGETPLATFORM 18 | ENV BITCOIN_VERSION=0.19.1 19 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 20 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 21 | 22 | RUN set -ex \ 23 | && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ 24 | && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ 25 | && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \ 26 | && for key in \ 27 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 28 | ; do \ 29 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 30 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 31 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 32 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 33 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 34 | done \ 35 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \ 36 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 37 | && gpg --verify SHA256SUMS.asc \ 38 | && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \ 39 | && tar -xzf *.tar.gz -C /opt \ 40 | && rm *.tar.gz *.asc \ 41 | && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt 42 | 43 | COPY docker-entrypoint.sh /entrypoint.sh 44 | 45 | VOLUME ["/home/bitcoin/.bitcoin"] 46 | 47 | EXPOSE 8332 8333 18332 18333 18443 18444 48 | 49 | ENTRYPOINT ["/entrypoint.sh"] 50 | 51 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 52 | 53 | CMD ["bitcoind"] 54 | -------------------------------------------------------------------------------- /0.20/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ARG TARGETPLATFORM 18 | ENV BITCOIN_VERSION=0.20.1 19 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 20 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 21 | 22 | RUN set -ex \ 23 | && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ 24 | && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ 25 | && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \ 26 | && for key in \ 27 | 01EA5486DE18A882D4C2684590C8019E36C2E964 \ 28 | ; do \ 29 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 30 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 31 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 32 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 33 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 34 | done \ 35 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \ 36 | && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 37 | && gpg --verify SHA256SUMS.asc \ 38 | && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS.asc | sha256sum -c - \ 39 | && tar -xzf *.tar.gz -C /opt \ 40 | && rm *.tar.gz *.asc \ 41 | && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt 42 | 43 | COPY docker-entrypoint.sh /entrypoint.sh 44 | 45 | VOLUME ["/home/bitcoin/.bitcoin"] 46 | 47 | EXPOSE 8332 8333 18332 18333 18443 18444 48 | 49 | ENTRYPOINT ["/entrypoint.sh"] 50 | 51 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 52 | 53 | CMD ["bitcoind"] 54 | -------------------------------------------------------------------------------- /0.13/alpine/patches/boost.patch: -------------------------------------------------------------------------------- 1 | diff --git src/miner.h src/miner.h 2 | index 11753f5e4..5979b6d18 100644 3 | --- src/miner.h 4 | +++ src/miner.h 5 | @@ -73,7 +73,7 @@ struct modifiedentry_iter { 6 | // except operating on CTxMemPoolModifiedEntry. 7 | // TODO: refactor to avoid duplication of this logic. 8 | struct CompareModifiedEntry { 9 | - bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) 10 | + bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const 11 | { 12 | double f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors; 13 | double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors; 14 | diff --git src/txmempool.h src/txmempool.h 15 | index 8129a0537..9bdadce25 100644 16 | --- src/txmempool.h 17 | +++ src/txmempool.h 18 | @@ -224,7 +224,7 @@ struct mempoolentry_txid 19 | class CompareTxMemPoolEntryByDescendantScore 20 | { 21 | public: 22 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 23 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 24 | { 25 | bool fUseADescendants = UseDescendantScore(a); 26 | bool fUseBDescendants = UseDescendantScore(b); 27 | @@ -246,7 +246,7 @@ public: 28 | } 29 | 30 | // Calculate which score to use for an entry (avoiding division). 31 | - bool UseDescendantScore(const CTxMemPoolEntry &a) 32 | + bool UseDescendantScore(const CTxMemPoolEntry &a) const 33 | { 34 | double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants(); 35 | double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize(); 36 | @@ -261,7 +261,7 @@ public: 37 | class CompareTxMemPoolEntryByScore 38 | { 39 | public: 40 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 41 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 42 | { 43 | double f1 = (double)a.GetModifiedFee() * b.GetTxSize(); 44 | double f2 = (double)b.GetModifiedFee() * a.GetTxSize(); 45 | @@ -275,7 +275,7 @@ public: 46 | class CompareTxMemPoolEntryByEntryTime 47 | { 48 | public: 49 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 50 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 51 | { 52 | return a.GetTime() < b.GetTime(); 53 | } 54 | @@ -284,7 +284,7 @@ public: 55 | class CompareTxMemPoolEntryByAncestorFee 56 | { 57 | public: 58 | - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) 59 | + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const 60 | { 61 | double aFees = a.GetModFeesWithAncestors(); 62 | double aSize = a.GetSizeWithAncestors(); 63 | -------------------------------------------------------------------------------- /24/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ARG TARGETPLATFORM 18 | ENV BITCOIN_VERSION=24.0.1 19 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 20 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 21 | 22 | RUN set -ex \ 23 | && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ 24 | && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ 25 | && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \ 26 | && for key in \ 27 | 152812300785C96444D3334D17565732E08E5E41 \ 28 | 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 29 | 590B7292695AFFA5B672CBB2E13FC145CD3F4304 \ 30 | CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \ 31 | F4FC70F07310028424EFC20A8E4256593F177720 \ 32 | D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \ 33 | 287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \ 34 | 9DEAE0DC7063249FB05474681E4AED62986CD25D \ 35 | 3EB0DEE6004A13BE5A0CC758BF2978B068054311 \ 36 | ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \ 37 | 28E72909F1717FE9607754F8A7BEB2621678D37D \ 38 | 79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF \ 39 | ; do \ 40 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 41 | gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \ 42 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 43 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 44 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 45 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 46 | done \ 47 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \ 48 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS \ 49 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 50 | && gpg --verify SHA256SUMS.asc SHA256SUMS \ 51 | && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS | sha256sum -c - \ 52 | && tar -xzf *.tar.gz -C /opt \ 53 | && rm *.tar.gz *.asc \ 54 | && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt 55 | 56 | COPY docker-entrypoint.sh /entrypoint.sh 57 | 58 | VOLUME ["/home/bitcoin/.bitcoin"] 59 | 60 | EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332 61 | 62 | ENTRYPOINT ["/entrypoint.sh"] 63 | 64 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 65 | 66 | CMD ["bitcoind"] 67 | -------------------------------------------------------------------------------- /22/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ARG TARGETPLATFORM 18 | ENV BITCOIN_VERSION=22.0 19 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 20 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 21 | 22 | RUN set -ex \ 23 | && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ 24 | && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ 25 | && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \ 26 | && for key in \ 27 | 0CCBAAFD76A2ECE2CCD3141DE2FFD5B1D88CA97D \ 28 | 152812300785C96444D3334D17565732E08E5E41 \ 29 | 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 30 | 590B7292695AFFA5B672CBB2E13FC145CD3F4304 \ 31 | 28F5900B1BB5D1A4B6B6D1A9ED357015286A333D \ 32 | 637DB1E23370F84AFF88CCE03152347D07DA627C \ 33 | CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \ 34 | 6E01EEC9656903B0542B8F1003DB6322267C373B \ 35 | D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \ 36 | 82921A4B88FD454B7EB8CE3C796C4109063D4EAF \ 37 | 9DEAE0DC7063249FB05474681E4AED62986CD25D \ 38 | 9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \ 39 | 74E2DEF5D77260B98BC19438099BAD163C70FBFA \ 40 | ; do \ 41 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 42 | gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \ 43 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 44 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 45 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 46 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 47 | done \ 48 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \ 49 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS \ 50 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 51 | && gpg --verify SHA256SUMS.asc SHA256SUMS \ 52 | && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS | sha256sum -c - \ 53 | && tar -xzf *.tar.gz -C /opt \ 54 | && rm *.tar.gz *.asc \ 55 | && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt 56 | 57 | COPY docker-entrypoint.sh /entrypoint.sh 58 | 59 | VOLUME ["/home/bitcoin/.bitcoin"] 60 | 61 | EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332 62 | 63 | ENTRYPOINT ["/entrypoint.sh"] 64 | 65 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 66 | 67 | CMD ["bitcoind"] 68 | -------------------------------------------------------------------------------- /23/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye-slim 2 | 3 | ARG UID=101 4 | ARG GID=101 5 | 6 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 7 | maintainer.1="Pedro Branco (@pedrobranco)" \ 8 | maintainer.2="Rui Marinho (@ruimarinho)" 9 | 10 | RUN groupadd --gid ${GID} bitcoin \ 11 | && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \ 12 | && apt-get update -y \ 13 | && apt-get install -y curl gnupg gosu \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 16 | 17 | ARG TARGETPLATFORM 18 | ENV BITCOIN_VERSION=23.0 19 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 20 | ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH 21 | 22 | RUN set -ex \ 23 | && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ 24 | && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ 25 | && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \ 26 | && for key in \ 27 | 152812300785C96444D3334D17565732E08E5E41 \ 28 | 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 29 | 590B7292695AFFA5B672CBB2E13FC145CD3F4304 \ 30 | 28F5900B1BB5D1A4B6B6D1A9ED357015286A333D \ 31 | 637DB1E23370F84AFF88CCE03152347D07DA627C \ 32 | CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \ 33 | F4FC70F07310028424EFC20A8E4256593F177720 \ 34 | D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \ 35 | 287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \ 36 | F9A8737BF4FF5C89C903DF31DD78544CF91B1514 \ 37 | 9DEAE0DC7063249FB05474681E4AED62986CD25D \ 38 | E463A93F5F3117EEDE6C7316BD02942421F4889F \ 39 | 9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \ 40 | 4DAF18FE948E7A965B30F9457E296D555E7F63A7 \ 41 | 28E72909F1717FE9607754F8A7BEB2621678D37D \ 42 | 74E2DEF5D77260B98BC19438099BAD163C70FBFA \ 43 | ; do \ 44 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 45 | gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \ 46 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 47 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 48 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 49 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 50 | done \ 51 | && curl -SL https://raw.githubusercontent.com/Kvaciral/kvaciral/main/kvaciral.asc | gpg --import \ 52 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \ 53 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS \ 54 | && curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \ 55 | && gpg --verify SHA256SUMS.asc SHA256SUMS \ 56 | && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS | sha256sum -c - \ 57 | && tar -xzf *.tar.gz -C /opt \ 58 | && rm *.tar.gz *.asc \ 59 | && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt 60 | 61 | COPY docker-entrypoint.sh /entrypoint.sh 62 | 63 | VOLUME ["/home/bitcoin/.bitcoin"] 64 | 65 | EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332 66 | 67 | ENTRYPOINT ["/entrypoint.sh"] 68 | 69 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 70 | 71 | CMD ["bitcoind"] 72 | -------------------------------------------------------------------------------- /0.20/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libtool 41 | RUN apk --no-cache add linux-headers 42 | RUN apk --no-cache add zeromq-dev 43 | RUN set -ex \ 44 | && for key in \ 45 | 90C8019E36C2E964 \ 46 | ; do \ 47 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 48 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 49 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 50 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 51 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 52 | done 53 | 54 | ENV BITCOIN_VERSION=0.20.1 55 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 56 | 57 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 58 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 59 | RUN gpg --verify SHA256SUMS.asc 60 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 61 | RUN tar -xzf *.tar.gz 62 | 63 | WORKDIR /bitcoin-${BITCOIN_VERSION} 64 | 65 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 66 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 67 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 68 | RUN ./autogen.sh 69 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 70 | --prefix=${BITCOIN_PREFIX} \ 71 | --mandir=/usr/share/man \ 72 | --disable-tests \ 73 | --disable-bench \ 74 | --disable-ccache \ 75 | --with-gui=no \ 76 | --with-utils \ 77 | --with-libs \ 78 | --with-daemon 79 | RUN make -j4 80 | RUN make install 81 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 82 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 83 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 84 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 85 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 86 | 87 | FROM alpine 88 | 89 | ARG UID=100 90 | ARG GID=101 91 | 92 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 93 | maintainer.1="Pedro Branco (@pedrobranco)" \ 94 | maintainer.2="Rui Marinho (@ruimarinho)" 95 | 96 | RUN addgroup -S bitcoin 97 | RUN adduser -G bitcoin -H -S bitcoin 98 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 99 | RUN apk --no-cache add \ 100 | boost-filesystem \ 101 | boost-system \ 102 | boost-thread \ 103 | libevent \ 104 | libzmq \ 105 | shadow \ 106 | su-exec 107 | 108 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 109 | ENV BITCOIN_VERSION=0.20.1 110 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 111 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 112 | 113 | COPY --from=bitcoin-core /opt /opt 114 | COPY docker-entrypoint.sh /entrypoint.sh 115 | 116 | VOLUME ["/home/bitcoin/.bitcoin"] 117 | 118 | EXPOSE 8332 8333 18332 18333 18444 119 | 120 | ENTRYPOINT ["/entrypoint.sh"] 121 | 122 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 123 | 124 | CMD ["bitcoind"] 125 | -------------------------------------------------------------------------------- /0.12/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine:3.9 as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine:3.9 as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libressl-dev 41 | RUN apk --no-cache add libtool 42 | RUN apk --no-cache add linux-headers 43 | RUN apk --no-cache add protobuf-dev 44 | RUN apk --no-cache add zeromq-dev 45 | RUN set -ex \ 46 | && for key in \ 47 | 90C8019E36C2E964 \ 48 | ; do \ 49 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 50 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 51 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 52 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 53 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 54 | done 55 | 56 | ENV BITCOIN_VERSION=0.12.1 57 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 58 | 59 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 60 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 61 | RUN gpg --verify SHA256SUMS.asc 62 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 63 | RUN tar -xzf *.tar.gz 64 | 65 | WORKDIR /bitcoin-${BITCOIN_VERSION} 66 | 67 | COPY patches/boost.patch /boost.patch 68 | COPY patches/warnings.patch /warnings.patch 69 | 70 | RUN patch -p0 < /boost.patch 71 | RUN patch -p0 < /warnings.patch 72 | RUN ./autogen.sh 73 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 74 | --prefix=${BITCOIN_PREFIX} \ 75 | --mandir=/usr/share/man \ 76 | --disable-tests \ 77 | --disable-bench \ 78 | --disable-ccache \ 79 | --with-gui=no \ 80 | --with-utils \ 81 | --with-libs \ 82 | --with-daemon 83 | RUN make -j4 84 | RUN make install 85 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 86 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 87 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 88 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 89 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 90 | 91 | # Build stage for compiled artifacts 92 | FROM alpine:3.9 93 | 94 | ARG UID=100 95 | ARG GID=101 96 | 97 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 98 | maintainer.1="Pedro Branco (@pedrobranco)" \ 99 | maintainer.2="Rui Marinho (@ruimarinho)" 100 | 101 | RUN addgroup -S bitcoin 102 | RUN adduser -G bitcoin -H -S bitcoin 103 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 104 | RUN apk --no-cache add \ 105 | boost \ 106 | boost-program_options \ 107 | libevent \ 108 | libressl \ 109 | libzmq \ 110 | shadow \ 111 | su-exec 112 | 113 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 114 | ENV BITCOIN_VERSION=0.12.1 115 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 116 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 117 | 118 | COPY --from=bitcoin-core /opt /opt 119 | COPY docker-entrypoint.sh /entrypoint.sh 120 | 121 | VOLUME ["/home/bitcoin/.bitcoin"] 122 | 123 | EXPOSE 8332 8333 18332 18333 18444 124 | 125 | ENTRYPOINT ["/entrypoint.sh"] 126 | 127 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 128 | 129 | CMD ["bitcoind"] 130 | -------------------------------------------------------------------------------- /0.13/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine:3.9 as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine:3.9 as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libressl-dev 41 | RUN apk --no-cache add libtool 42 | RUN apk --no-cache add linux-headers 43 | RUN apk --no-cache add protobuf-dev 44 | RUN apk --no-cache add zeromq-dev 45 | RUN set -ex \ 46 | && for key in \ 47 | 90C8019E36C2E964 \ 48 | ; do \ 49 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 50 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 51 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 52 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 53 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 54 | done 55 | 56 | ENV BITCOIN_VERSION=0.13.2 57 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 58 | 59 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 60 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 61 | RUN gpg --verify SHA256SUMS.asc 62 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 63 | RUN tar -xzf *.tar.gz 64 | 65 | WORKDIR /bitcoin-${BITCOIN_VERSION} 66 | 67 | COPY patches/boost.patch /boost.patch 68 | COPY patches/warnings.patch /warnings.patch 69 | 70 | RUN patch -p0 < /boost.patch 71 | RUN patch -p0 < /warnings.patch 72 | RUN ./autogen.sh 73 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 74 | --prefix=${BITCOIN_PREFIX} \ 75 | --mandir=/usr/share/man \ 76 | --disable-tests \ 77 | --disable-bench \ 78 | --disable-ccache \ 79 | --with-gui=no \ 80 | --with-utils \ 81 | --with-libs \ 82 | --with-daemon 83 | RUN make -j4 84 | RUN make install 85 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 86 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 87 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 88 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 89 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 90 | 91 | # Build stage for compiled artifacts 92 | FROM alpine:3.9 93 | 94 | ARG UID=100 95 | ARG GID=101 96 | 97 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 98 | maintainer.1="Pedro Branco (@pedrobranco)" \ 99 | maintainer.2="Rui Marinho (@ruimarinho)" 100 | 101 | RUN addgroup -S bitcoin 102 | RUN adduser -G bitcoin -H -S bitcoin 103 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 104 | RUN apk --no-cache add \ 105 | boost \ 106 | boost-program_options \ 107 | libevent \ 108 | libressl \ 109 | libzmq \ 110 | shadow \ 111 | su-exec 112 | 113 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 114 | ENV BITCOIN_VERSION=0.13.2 115 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 116 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 117 | 118 | COPY --from=bitcoin-core /opt /opt 119 | COPY docker-entrypoint.sh /entrypoint.sh 120 | 121 | VOLUME ["/home/bitcoin/.bitcoin"] 122 | 123 | EXPOSE 8332 8333 18332 18333 18444 124 | 125 | ENTRYPOINT ["/entrypoint.sh"] 126 | 127 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 128 | 129 | CMD ["bitcoind"] 130 | -------------------------------------------------------------------------------- /0.19/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libressl-dev 41 | RUN apk --no-cache add libtool 42 | RUN apk --no-cache add linux-headers 43 | RUN apk --no-cache add zeromq-dev 44 | RUN set -ex \ 45 | && for key in \ 46 | 90C8019E36C2E964 \ 47 | ; do \ 48 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 49 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 50 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 51 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 52 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 53 | done 54 | 55 | ENV BITCOIN_VERSION=0.19.1 56 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 57 | 58 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 59 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 60 | RUN gpg --verify SHA256SUMS.asc 61 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 62 | RUN tar -xzf *.tar.gz 63 | 64 | WORKDIR /bitcoin-${BITCOIN_VERSION} 65 | 66 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 67 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 68 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 69 | RUN ./autogen.sh 70 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 71 | --prefix=${BITCOIN_PREFIX} \ 72 | --mandir=/usr/share/man \ 73 | --disable-tests \ 74 | --disable-bench \ 75 | --disable-ccache \ 76 | --with-gui=no \ 77 | --with-utils \ 78 | --with-libs \ 79 | --with-daemon 80 | RUN make -j4 81 | RUN make install 82 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 83 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 84 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 85 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 86 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 87 | 88 | FROM alpine 89 | 90 | ARG UID=101 91 | ARG GID=101 92 | 93 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 94 | maintainer.1="Pedro Branco (@pedrobranco)" \ 95 | maintainer.2="Rui Marinho (@ruimarinho)" 96 | 97 | RUN addgroup -S bitcoin 98 | RUN adduser -G bitcoin -H -S bitcoin 99 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 100 | RUN apk --no-cache add \ 101 | boost-chrono \ 102 | boost-filesystem \ 103 | boost-system \ 104 | boost-thread \ 105 | libevent \ 106 | libressl \ 107 | libzmq \ 108 | shadow \ 109 | su-exec 110 | 111 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 112 | ENV BITCOIN_VERSION=0.19.1 113 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 114 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 115 | 116 | COPY --from=bitcoin-core /opt /opt 117 | COPY docker-entrypoint.sh /entrypoint.sh 118 | 119 | VOLUME ["/home/bitcoin/.bitcoin"] 120 | 121 | EXPOSE 8332 8333 18332 18333 18444 122 | 123 | ENTRYPOINT ["/entrypoint.sh"] 124 | 125 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 126 | 127 | CMD ["bitcoind"] 128 | -------------------------------------------------------------------------------- /0.21/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libtool 41 | RUN apk --no-cache add linux-headers 42 | RUN apk --no-cache add sqlite-dev 43 | RUN apk --no-cache add zeromq-dev 44 | RUN set -ex \ 45 | && for key in \ 46 | 90C8019E36C2E964 \ 47 | ; do \ 48 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 49 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 50 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 51 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 52 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 53 | done 54 | 55 | ENV BITCOIN_VERSION=0.21.1 56 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 57 | 58 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 59 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 60 | RUN gpg --verify SHA256SUMS.asc 61 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 62 | RUN tar -xzf *.tar.gz 63 | 64 | WORKDIR /bitcoin-${BITCOIN_VERSION} 65 | 66 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 67 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 68 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 69 | RUN ./autogen.sh 70 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 71 | --prefix=${BITCOIN_PREFIX} \ 72 | --mandir=/usr/share/man \ 73 | --disable-tests \ 74 | --disable-bench \ 75 | --disable-ccache \ 76 | --with-gui=no \ 77 | --with-utils \ 78 | --with-libs \ 79 | --with-sqlite=yes \ 80 | --with-daemon 81 | RUN make -j4 82 | RUN make install 83 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 84 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 85 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 86 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 87 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 88 | 89 | FROM alpine 90 | 91 | ARG UID=100 92 | ARG GID=101 93 | 94 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 95 | maintainer.1="Pedro Branco (@pedrobranco)" \ 96 | maintainer.2="Rui Marinho (@ruimarinho)" 97 | 98 | RUN addgroup -S bitcoin 99 | RUN adduser -G bitcoin -H -S bitcoin 100 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 101 | RUN apk --no-cache add \ 102 | boost-filesystem \ 103 | boost-system \ 104 | boost-thread \ 105 | sqlite-dev \ 106 | libevent \ 107 | libzmq \ 108 | shadow \ 109 | su-exec 110 | 111 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 112 | ENV BITCOIN_VERSION=0.21.1 113 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 114 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 115 | 116 | COPY --from=bitcoin-core /opt /opt 117 | COPY docker-entrypoint.sh /entrypoint.sh 118 | 119 | VOLUME ["/home/bitcoin/.bitcoin"] 120 | 121 | EXPOSE 8332 8333 18332 18333 18444 122 | 123 | ENTRYPOINT ["/entrypoint.sh"] 124 | 125 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 126 | 127 | CMD ["bitcoind"] 128 | -------------------------------------------------------------------------------- /0.16/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine:3.9 as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine:3.9 as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libressl-dev 41 | RUN apk --no-cache add libtool 42 | RUN apk --no-cache add linux-headers 43 | RUN apk --no-cache add protobuf-dev 44 | RUN apk --no-cache add zeromq-dev 45 | RUN set -ex \ 46 | && for key in \ 47 | 90C8019E36C2E964 \ 48 | ; do \ 49 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 50 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 51 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 52 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 53 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 54 | done 55 | 56 | ENV BITCOIN_VERSION=0.16.3 57 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 58 | 59 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 60 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 61 | RUN gpg --verify SHA256SUMS.asc 62 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 63 | RUN tar -xzf *.tar.gz 64 | 65 | WORKDIR /bitcoin-${BITCOIN_VERSION} 66 | 67 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 68 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 69 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 70 | RUN ./autogen.sh 71 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 72 | --prefix=${BITCOIN_PREFIX} \ 73 | --mandir=/usr/share/man \ 74 | --disable-tests \ 75 | --disable-bench \ 76 | --disable-ccache \ 77 | --with-gui=no \ 78 | --with-utils \ 79 | --with-libs \ 80 | --with-daemon 81 | RUN make -j4 82 | RUN make install 83 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 84 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 85 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 86 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 87 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 88 | 89 | # Build stage for compiled artifacts 90 | FROM alpine:3.9 91 | 92 | ARG UID=100 93 | ARG GID=101 94 | 95 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 96 | maintainer.1="Pedro Branco (@pedrobranco)" \ 97 | maintainer.2="Rui Marinho (@ruimarinho)" 98 | 99 | RUN addgroup -S bitcoin 100 | RUN adduser -G bitcoin -H -S bitcoin 101 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 102 | RUN apk --no-cache add \ 103 | boost \ 104 | boost-program_options \ 105 | libevent \ 106 | libressl \ 107 | libzmq \ 108 | shadow \ 109 | su-exec 110 | 111 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 112 | ENV BITCOIN_VERSION=0.16.3 113 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 114 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 115 | 116 | COPY --from=bitcoin-core /opt /opt 117 | COPY docker-entrypoint.sh /entrypoint.sh 118 | 119 | VOLUME ["/home/bitcoin/.bitcoin"] 120 | 121 | EXPOSE 8332 8333 18332 18333 18444 122 | 123 | ENTRYPOINT ["/entrypoint.sh"] 124 | 125 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 126 | 127 | CMD ["bitcoind"] 128 | -------------------------------------------------------------------------------- /0.17/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine:3.9 as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine:3.9 as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libressl-dev 41 | RUN apk --no-cache add libtool 42 | RUN apk --no-cache add linux-headers 43 | RUN apk --no-cache add protobuf-dev 44 | RUN apk --no-cache add zeromq-dev 45 | RUN set -ex \ 46 | && for key in \ 47 | 90C8019E36C2E964 \ 48 | ; do \ 49 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 50 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 51 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 52 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 53 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 54 | done 55 | 56 | ENV BITCOIN_VERSION=0.17.1 57 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 58 | 59 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 60 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 61 | RUN gpg --verify SHA256SUMS.asc 62 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 63 | RUN tar -xzf *.tar.gz 64 | 65 | WORKDIR /bitcoin-${BITCOIN_VERSION} 66 | 67 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 68 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 69 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 70 | RUN ./autogen.sh 71 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 72 | --prefix=${BITCOIN_PREFIX} \ 73 | --mandir=/usr/share/man \ 74 | --disable-tests \ 75 | --disable-bench \ 76 | --disable-ccache \ 77 | --with-gui=no \ 78 | --with-utils \ 79 | --with-libs \ 80 | --with-daemon 81 | RUN make -j4 82 | RUN make install 83 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 84 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 85 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 86 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 87 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 88 | 89 | # Build stage for compiled artifacts 90 | FROM alpine:3.9 91 | 92 | ARG UID=100 93 | ARG GID=101 94 | 95 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 96 | maintainer.1="Pedro Branco (@pedrobranco)" \ 97 | maintainer.2="Rui Marinho (@ruimarinho)" 98 | 99 | RUN addgroup -S bitcoin 100 | RUN adduser -G bitcoin -H -S bitcoin 101 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 102 | RUN apk --no-cache add \ 103 | boost \ 104 | boost-program_options \ 105 | libevent \ 106 | libressl \ 107 | libzmq \ 108 | shadow \ 109 | su-exec 110 | 111 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 112 | ENV BITCOIN_VERSION=0.17.1 113 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 114 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 115 | 116 | COPY --from=bitcoin-core /opt /opt 117 | COPY docker-entrypoint.sh /entrypoint.sh 118 | 119 | VOLUME ["/home/bitcoin/.bitcoin"] 120 | 121 | EXPOSE 8332 8333 18332 18333 18444 122 | 123 | ENTRYPOINT ["/entrypoint.sh"] 124 | 125 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 126 | 127 | CMD ["bitcoind"] 128 | -------------------------------------------------------------------------------- /0.18/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine:3.9 as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine:3.9 as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libressl-dev 41 | RUN apk --no-cache add libtool 42 | RUN apk --no-cache add linux-headers 43 | RUN apk --no-cache add protobuf-dev 44 | RUN apk --no-cache add zeromq-dev 45 | RUN set -ex \ 46 | && for key in \ 47 | 90C8019E36C2E964 \ 48 | ; do \ 49 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 50 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 51 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 52 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 53 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 54 | done 55 | 56 | ENV BITCOIN_VERSION=0.18.1 57 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 58 | 59 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 60 | RUN wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 61 | RUN gpg --verify SHA256SUMS.asc 62 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 63 | RUN tar -xzf *.tar.gz 64 | 65 | WORKDIR /bitcoin-${BITCOIN_VERSION} 66 | 67 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 68 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 69 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 70 | RUN ./autogen.sh 71 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 72 | --prefix=${BITCOIN_PREFIX} \ 73 | --mandir=/usr/share/man \ 74 | --disable-tests \ 75 | --disable-bench \ 76 | --disable-ccache \ 77 | --with-gui=no \ 78 | --with-utils \ 79 | --with-libs \ 80 | --with-daemon 81 | RUN make -j4 82 | RUN make install 83 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 84 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 85 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 86 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 87 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 88 | 89 | # Build stage for compiled artifacts 90 | FROM alpine:3.9 91 | 92 | ARG UID=100 93 | ARG GID=101 94 | 95 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 96 | maintainer.1="Pedro Branco (@pedrobranco)" \ 97 | maintainer.2="Rui Marinho (@ruimarinho)" 98 | 99 | RUN addgroup -S bitcoin 100 | RUN adduser -G bitcoin -H -S bitcoin 101 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 102 | RUN apk --no-cache add \ 103 | boost \ 104 | boost-program_options \ 105 | libevent \ 106 | libressl \ 107 | libzmq \ 108 | shadow \ 109 | su-exec 110 | 111 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 112 | ENV BITCOIN_VERSION=0.18.1 113 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 114 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 115 | 116 | COPY --from=bitcoin-core /opt /opt 117 | COPY docker-entrypoint.sh /entrypoint.sh 118 | 119 | VOLUME ["/home/bitcoin/.bitcoin"] 120 | 121 | EXPOSE 8332 8333 18332 18333 18444 122 | 123 | ENTRYPOINT ["/entrypoint.sh"] 124 | 125 | RUN bitcoind -version | grep "Bitcoin Core Daemon" 126 | 127 | CMD ["bitcoind"] 128 | -------------------------------------------------------------------------------- /0.11/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine:3.7 as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add openssl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine:3.7 as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add ca-certificates 36 | RUN apk --no-cache add chrpath 37 | RUN apk --no-cache add curl 38 | RUN apk --no-cache add file 39 | RUN apk --no-cache add gnupg 40 | RUN apk --no-cache add libevent-dev 41 | RUN apk --no-cache add openssl 42 | RUN apk --no-cache add openssl-dev 43 | RUN apk --no-cache add libtool 44 | RUN apk --no-cache add linux-headers 45 | RUN apk --no-cache add protobuf-dev 46 | RUN apk --no-cache add zeromq-dev 47 | RUN set -ex \ 48 | && for key in \ 49 | 90C8019E36C2E964 \ 50 | ; do \ 51 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 52 | gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ 53 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 54 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 55 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 56 | done 57 | 58 | # Workaround for Let's Encrypt DST Root CA X3 expiration. 59 | RUN sed -i 's#mozilla\/DST_Root_CA_X3.crt#!mozilla\/DST_Root_CA_X3.crt#g' /etc/ca-certificates.conf 60 | RUN update-ca-certificates 61 | 62 | ENV BITCOIN_VERSION=0.11.2 63 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 64 | 65 | RUN curl -O https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 66 | RUN curl -O https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 67 | RUN gpg --verify SHA256SUMS.asc 68 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - 69 | RUN tar -xzf *.tar.gz 70 | 71 | WORKDIR /bitcoin-${BITCOIN_VERSION} 72 | 73 | COPY patches/warnings.patch /warnings.patch 74 | 75 | RUN patch -p0 < /warnings.patch 76 | RUN ./autogen.sh 77 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 78 | --prefix=${BITCOIN_PREFIX} \ 79 | --mandir=/usr/share/man \ 80 | --disable-tests \ 81 | --disable-bench \ 82 | --disable-ccache \ 83 | --with-gui=no \ 84 | --with-utils \ 85 | --with-libs \ 86 | --with-daemon 87 | RUN make -j4 88 | RUN make install 89 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 90 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 91 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 92 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 93 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 94 | 95 | # Build stage for compiled artifacts 96 | FROM alpine:3.7 97 | 98 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 99 | maintainer.1="Pedro Branco (@pedrobranco)" \ 100 | maintainer.2="Rui Marinho (@ruimarinho)" 101 | 102 | RUN addgroup -S bitcoin 103 | RUN adduser -G bitcoin -H -S bitcoin 104 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 105 | RUN apk --no-cache add \ 106 | boost \ 107 | boost-program_options \ 108 | libevent \ 109 | openssl \ 110 | libzmq \ 111 | shadow \ 112 | su-exec 113 | 114 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 115 | ENV BITCOIN_VERSION=0.11.2 116 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 117 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 118 | 119 | COPY --from=bitcoin-core /opt /opt 120 | COPY docker-entrypoint.sh /entrypoint.sh 121 | 122 | VOLUME ["/home/bitcoin/.bitcoin"] 123 | 124 | EXPOSE 8332 8333 18332 18333 18444 125 | 126 | ENTRYPOINT ["/entrypoint.sh"] 127 | 128 | CMD ["bitcoind"] 129 | -------------------------------------------------------------------------------- /24/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} --build=aarch64-unknown-linux-gnu 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libtool 41 | RUN apk --no-cache add linux-headers 42 | RUN apk --no-cache add sqlite-dev 43 | RUN apk --no-cache add zeromq-dev 44 | RUN set -ex \ 45 | && for key in \ 46 | 152812300785C96444D3334D17565732E08E5E41 \ 47 | 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 48 | 590B7292695AFFA5B672CBB2E13FC145CD3F4304 \ 49 | CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \ 50 | F4FC70F07310028424EFC20A8E4256593F177720 \ 51 | D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \ 52 | 287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \ 53 | 9DEAE0DC7063249FB05474681E4AED62986CD25D \ 54 | 3EB0DEE6004A13BE5A0CC758BF2978B068054311 \ 55 | ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \ 56 | 28E72909F1717FE9607754F8A7BEB2621678D37D \ 57 | 79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF \ 58 | ; do \ 59 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 60 | gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \ 61 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 62 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 63 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 64 | done 65 | 66 | ENV BITCOIN_VERSION=24.0.1 67 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 68 | 69 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS 70 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 71 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 72 | RUN gpg --verify SHA256SUMS.asc SHA256SUMS 73 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c - 74 | RUN tar -xzf *.tar.gz 75 | 76 | WORKDIR /bitcoin-${BITCOIN_VERSION} 77 | 78 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat/compat.h 79 | RUN ./autogen.sh 80 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 81 | --prefix=${BITCOIN_PREFIX} \ 82 | --mandir=/usr/share/man \ 83 | --disable-tests \ 84 | --disable-bench \ 85 | --disable-ccache \ 86 | --with-gui=no \ 87 | --with-utils \ 88 | --with-libs \ 89 | --with-sqlite=yes \ 90 | --with-daemon 91 | RUN make -j4 92 | RUN make install 93 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 94 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 95 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 96 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 97 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 98 | 99 | # Build stage for compiled artifacts 100 | FROM alpine 101 | 102 | ARG UID=100 103 | ARG GID=101 104 | 105 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 106 | maintainer.1="Pedro Branco (@pedrobranco)" \ 107 | maintainer.2="Rui Marinho (@ruimarinho)" 108 | 109 | RUN addgroup bitcoin --gid ${GID} --system 110 | RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin 111 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 112 | RUN apk --no-cache add \ 113 | boost-filesystem \ 114 | boost-system \ 115 | boost-thread \ 116 | libevent \ 117 | libzmq \ 118 | shadow \ 119 | sqlite-dev \ 120 | su-exec 121 | 122 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 123 | ENV BITCOIN_VERSION=24.0.1 124 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 125 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 126 | 127 | COPY --from=bitcoin-core /opt /opt 128 | COPY docker-entrypoint.sh /entrypoint.sh 129 | 130 | VOLUME ["/home/bitcoin/.bitcoin"] 131 | 132 | EXPOSE 8332 8333 18332 18333 18444 133 | 134 | ENTRYPOINT ["/entrypoint.sh"] 135 | 136 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 137 | 138 | CMD ["bitcoind"] 139 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | version: 11 | - '24' 12 | - '24/alpine' 13 | - '23' 14 | - '23/alpine' 15 | - '22' 16 | - '22/alpine' 17 | - '0.21' 18 | - '0.21/alpine' 19 | - '0.20' 20 | - '0.20/alpine' 21 | - '0.19' 22 | - '0.19/alpine' 23 | - '0.18' 24 | - '0.18/alpine' 25 | - '0.17' 26 | - '0.17/alpine' 27 | - '0.16' 28 | - '0.16/alpine' 29 | - '0.13' 30 | - '0.13/alpine' 31 | - '0.12' 32 | - '0.12/alpine' 33 | - '0.11' 34 | - '0.11/alpine' 35 | fail-fast: false 36 | steps: 37 | - name: Set up Docker Buildx 38 | uses: crazy-max/ghaction-docker-buildx@v1 39 | 40 | - name: Checkout 41 | uses: actions/checkout@v2 42 | 43 | - name: Prepare Docker build 44 | id: prepare 45 | run: | 46 | function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } 47 | 48 | BITCOIN_VERSION=${{matrix.version}} 49 | LATEST_BITCOIN_MAJOR_VERSION=$(find . -type d -maxdepth 1 -not -path '*/\.*' | sort -n | tail -n 1 | cut -c 3-) 50 | PLATFORMS="linux/amd64" 51 | PUSH=false 52 | REPO=ruimarinho/bitcoin-core 53 | TAGS=() 54 | 55 | if [[ $GITHUB_REF == refs/tags/* ]]; then 56 | TAG=${GITHUB_REF#refs/tags/} 57 | PUSH=true 58 | 59 | if [[ ${BITCOIN_VERSION} == *"alpine"* ]]; then 60 | TAGS+=("$REPO:$TAG-alpine") 61 | else 62 | TAGS+=("$REPO:$TAG") 63 | fi 64 | 65 | if [ $(version ${TAG}) -ge $(version "22.0") ]; then 66 | TAG_MAJOR_MINOR=$(echo $TAG | cut -c -2)" 67 | else 68 | TAG_MAJOR_MINOR=$(echo $TAG | cut -c -4)" 69 | fi 70 | 71 | if [ $(version ${TAG_MAJOR_MINOR}) -ne $(version ${BITCOIN_VERSION}) ]; then 72 | echo "Skipping build of base image $BITCOIN_VERSION/ as ${TAG} is targeted at ${TAG_MAJOR_MINOR}/" 73 | exit 0 74 | fi 75 | else 76 | TAGS=("$REPO:${BITCOIN_VERSION/\//-}") 77 | 78 | if [ $(version ${BITCOIN_VERSION}) -ge $(version ${LATEST_BITCOIN_MAJOR_VERSION}) ]; then 79 | echo "Version $(version ${BITCOIN_VERSION}) is greater than or equal to $(version ${LATEST_BITCOIN_MAJOR_VERSION}), tagging as latest" 80 | 81 | if [[ ${BITCOIN_VERSION} != *"alpine"* ]]; then 82 | TAGS+=("$REPO:latest") 83 | else 84 | TAGS+=("$REPO:alpine") 85 | fi 86 | fi 87 | 88 | if [ $GITHUB_REF == "refs/heads/master" ]; then 89 | PUSH=true 90 | fi 91 | fi 92 | 93 | if [[ ${BITCOIN_VERSION} != *"alpine"* ]] && [ $(version ${BITCOIN_VERSION}) -ge $(version "0.19") ]; then 94 | PLATFORMS="linux/amd64,linux/arm/v7,linux/arm64" 95 | fi 96 | 97 | echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ') 98 | echo ::set-output name=docker_platforms::${PLATFORMS} 99 | echo ::set-output name=docker_username::ruimarinho 100 | echo ::set-output name=push::${PUSH} 101 | echo ::set-output name=tags::${TAGS[@]} 102 | echo ::set-output name=build::true 103 | 104 | - if: ${{ steps.prepare.outputs.build }} == 'true' 105 | name: Login into Docker Hub 106 | uses: docker/login-action@v1 107 | with: 108 | username: ruimarinho 109 | password: ${{ secrets.DOCKER_HUB_PASSWORD }} 110 | 111 | - if: ${{ steps.prepare.outputs.build }} == 'true' 112 | name: Build Docker image 113 | run: | 114 | TAGS=(${{ steps.prepare.outputs.tags }}) 115 | 116 | echo "Build date: ${{ steps.prepare.outputs.build_date }}" 117 | echo "Docker platform: ${{ steps.prepare.outputs.docker_platforms }}" 118 | echo "Push: ${{ steps.prepare.outputs.push }}" 119 | echo "Tags: ${{ steps.prepare.outputs.tags }}" 120 | 121 | echo docker buildx build --platform ${{ steps.prepare.outputs.docker_platforms }} \ 122 | --output "type=image,push=${{steps.prepare.outputs.push}}" \ 123 | --progress=plain \ 124 | --build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \ 125 | --build-arg "VCS_REF=${GITHUB_SHA::8}" \ 126 | $(printf "%s" "${TAGS[@]/#/ --tag }" ) \ 127 | ${{ matrix.version }}/ 128 | 129 | docker buildx build --platform ${{ steps.prepare.outputs.docker_platforms }} \ 130 | --output "type=image,push=${{steps.prepare.outputs.push}}" \ 131 | --progress=plain \ 132 | --build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \ 133 | --build-arg "VCS_REF=${GITHUB_SHA::8}" \ 134 | $(printf "%s" "${TAGS[@]/#/ --tag }" ) \ 135 | ${{ matrix.version }}/ 136 | -------------------------------------------------------------------------------- /22/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine as berkeleydb 3 | 4 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 5 | RUN apk --no-cache add autoconf 6 | RUN apk --no-cache add automake 7 | RUN apk --no-cache add build-base 8 | RUN apk --no-cache add libressl 9 | 10 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 11 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 12 | 13 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 14 | RUN tar -xzf *.tar.gz 15 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 16 | RUN mkdir -p ${BERKELEYDB_PREFIX} 17 | 18 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 19 | 20 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 21 | RUN make -j4 22 | RUN make install 23 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 24 | 25 | # Build stage for Bitcoin Core 26 | FROM alpine as bitcoin-core 27 | 28 | COPY --from=berkeleydb /opt /opt 29 | 30 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 31 | RUN apk --no-cache add autoconf 32 | RUN apk --no-cache add automake 33 | RUN apk --no-cache add boost-dev 34 | RUN apk --no-cache add build-base 35 | RUN apk --no-cache add chrpath 36 | RUN apk --no-cache add file 37 | RUN apk --no-cache add gnupg 38 | RUN apk --no-cache add libevent-dev 39 | RUN apk --no-cache add libressl 40 | RUN apk --no-cache add libtool 41 | RUN apk --no-cache add linux-headers 42 | RUN apk --no-cache add sqlite-dev 43 | RUN apk --no-cache add zeromq-dev 44 | RUN set -ex \ 45 | && for key in \ 46 | 0CCBAAFD76A2ECE2CCD3141DE2FFD5B1D88CA97D \ 47 | 152812300785C96444D3334D17565732E08E5E41 \ 48 | 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 49 | 590B7292695AFFA5B672CBB2E13FC145CD3F4304 \ 50 | 28F5900B1BB5D1A4B6B6D1A9ED357015286A333D \ 51 | 637DB1E23370F84AFF88CCE03152347D07DA627C \ 52 | CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \ 53 | 6E01EEC9656903B0542B8F1003DB6322267C373B \ 54 | D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \ 55 | 82921A4B88FD454B7EB8CE3C796C4109063D4EAF \ 56 | 9DEAE0DC7063249FB05474681E4AED62986CD25D \ 57 | 9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \ 58 | 74E2DEF5D77260B98BC19438099BAD163C70FBFA \ 59 | ; do \ 60 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 61 | gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \ 62 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 63 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 64 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 65 | done 66 | 67 | ENV BITCOIN_VERSION=22.0 68 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 69 | 70 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS 71 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 72 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 73 | RUN gpg --verify SHA256SUMS.asc SHA256SUMS 74 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c - 75 | RUN tar -xzf *.tar.gz 76 | 77 | WORKDIR /bitcoin-${BITCOIN_VERSION} 78 | 79 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 80 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 81 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 82 | RUN ./autogen.sh 83 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 84 | --prefix=${BITCOIN_PREFIX} \ 85 | --mandir=/usr/share/man \ 86 | --disable-tests \ 87 | --disable-bench \ 88 | --disable-ccache \ 89 | --with-gui=no \ 90 | --with-utils \ 91 | --with-libs \ 92 | --with-sqlite=yes \ 93 | --with-daemon 94 | RUN make -j4 95 | RUN make install 96 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 97 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 98 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 99 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 100 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 101 | 102 | FROM alpine 103 | 104 | ARG UID=100 105 | ARG GID=101 106 | 107 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 108 | maintainer.1="Pedro Branco (@pedrobranco)" \ 109 | maintainer.2="Rui Marinho (@ruimarinho)" 110 | 111 | RUN addgroup bitcoin --gid ${GID} --system 112 | RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin 113 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 114 | RUN apk --no-cache add \ 115 | boost-filesystem \ 116 | boost-system \ 117 | boost-thread \ 118 | libevent \ 119 | libzmq \ 120 | shadow \ 121 | sqlite-dev \ 122 | su-exec 123 | 124 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 125 | ENV BITCOIN_VERSION=22.0 126 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 127 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 128 | 129 | COPY --from=bitcoin-core /opt /opt 130 | COPY docker-entrypoint.sh /entrypoint.sh 131 | 132 | VOLUME ["/home/bitcoin/.bitcoin"] 133 | 134 | EXPOSE 8332 8333 18332 18333 18444 135 | 136 | ENTRYPOINT ["/entrypoint.sh"] 137 | 138 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 139 | 140 | CMD ["bitcoind"] 141 | -------------------------------------------------------------------------------- /23/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for BerkeleyDB 2 | FROM alpine as berkeleydb 3 | 4 | ARG TARGETPLATFORM 5 | 6 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 7 | RUN apk --no-cache add autoconf 8 | RUN apk --no-cache add automake 9 | RUN apk --no-cache add build-base 10 | RUN apk --no-cache add libressl 11 | 12 | ENV BERKELEYDB_VERSION=db-4.8.30.NC 13 | ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION} 14 | 15 | RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz 16 | RUN tar -xzf *.tar.gz 17 | RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h 18 | RUN mkdir -p ${BERKELEYDB_PREFIX} 19 | 20 | WORKDIR /${BERKELEYDB_VERSION}/build_unix 21 | 22 | RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} 23 | RUN make -j4 24 | RUN make install 25 | RUN rm -rf ${BERKELEYDB_PREFIX}/docs 26 | 27 | # Build stage for Bitcoin Core 28 | FROM alpine as bitcoin-core 29 | 30 | COPY --from=berkeleydb /opt /opt 31 | 32 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 33 | RUN apk --no-cache add autoconf 34 | RUN apk --no-cache add automake 35 | RUN apk --no-cache add boost-dev 36 | RUN apk --no-cache add build-base 37 | RUN apk --no-cache add chrpath 38 | RUN apk --no-cache add file 39 | RUN apk --no-cache add gnupg 40 | RUN apk --no-cache add libevent-dev 41 | RUN apk --no-cache add libressl 42 | RUN apk --no-cache add libtool 43 | RUN apk --no-cache add linux-headers 44 | RUN apk --no-cache add sqlite-dev 45 | RUN apk --no-cache add zeromq-dev 46 | RUN set -ex \ 47 | && for key in \ 48 | 152812300785C96444D3334D17565732E08E5E41 \ 49 | 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 50 | 590B7292695AFFA5B672CBB2E13FC145CD3F4304 \ 51 | 28F5900B1BB5D1A4B6B6D1A9ED357015286A333D \ 52 | 637DB1E23370F84AFF88CCE03152347D07DA627C \ 53 | CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \ 54 | F4FC70F07310028424EFC20A8E4256593F177720 \ 55 | D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \ 56 | 287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \ 57 | F9A8737BF4FF5C89C903DF31DD78544CF91B1514 \ 58 | 9DEAE0DC7063249FB05474681E4AED62986CD25D \ 59 | E463A93F5F3117EEDE6C7316BD02942421F4889F \ 60 | 9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \ 61 | 4DAF18FE948E7A965B30F9457E296D555E7F63A7 \ 62 | 28E72909F1717FE9607754F8A7BEB2621678D37D \ 63 | 74E2DEF5D77260B98BC19438099BAD163C70FBFA \ 64 | ; do \ 65 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ 66 | gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \ 67 | gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ 68 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ 69 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \ 70 | done && \ 71 | wget -O- https://raw.githubusercontent.com/Kvaciral/kvaciral/main/kvaciral.asc | gpg --import 72 | 73 | ENV BITCOIN_VERSION=23.0 74 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 75 | 76 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS 77 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc 78 | RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz 79 | RUN gpg --verify SHA256SUMS.asc SHA256SUMS 80 | RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c - 81 | RUN tar -xzf *.tar.gz 82 | 83 | WORKDIR /bitcoin-${BITCOIN_VERSION} 84 | 85 | RUN sed -i '/AC_PREREQ/a\AR_FLAGS=cr' src/univalue/configure.ac 86 | RUN sed -i '/AX_PROG_CC_FOR_BUILD/a\AR_FLAGS=cr' src/secp256k1/configure.ac 87 | RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat.h 88 | RUN ./autogen.sh 89 | RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \ 90 | --prefix=${BITCOIN_PREFIX} \ 91 | --mandir=/usr/share/man \ 92 | --disable-tests \ 93 | --disable-bench \ 94 | --disable-ccache \ 95 | --with-gui=no \ 96 | --with-utils \ 97 | --with-libs \ 98 | --with-sqlite=yes \ 99 | --with-daemon 100 | RUN make -j4 101 | RUN make install 102 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli 103 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx 104 | RUN strip ${BITCOIN_PREFIX}/bin/bitcoind 105 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a 106 | RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 107 | 108 | # Build stage for compiled artifacts 109 | FROM alpine 110 | 111 | ARG UID=100 112 | ARG GID=101 113 | 114 | LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \ 115 | maintainer.1="Pedro Branco (@pedrobranco)" \ 116 | maintainer.2="Rui Marinho (@ruimarinho)" 117 | 118 | RUN addgroup bitcoin --gid ${GID} --system 119 | RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin 120 | RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories 121 | RUN apk --no-cache add \ 122 | boost-filesystem \ 123 | boost-system \ 124 | boost-thread \ 125 | sqlite-dev \ 126 | libevent \ 127 | libzmq \ 128 | su-exec 129 | 130 | ENV BITCOIN_DATA=/home/bitcoin/.bitcoin 131 | ENV BITCOIN_VERSION=23.0 132 | ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} 133 | ENV PATH=${BITCOIN_PREFIX}/bin:$PATH 134 | 135 | COPY --from=bitcoin-core /opt /opt 136 | COPY docker-entrypoint.sh /entrypoint.sh 137 | 138 | VOLUME ["/home/bitcoin/.bitcoin"] 139 | 140 | EXPOSE 8332 8333 18332 18333 18444 141 | 142 | ENTRYPOINT ["/entrypoint.sh"] 143 | 144 | RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" 145 | 146 | CMD ["bitcoind"] 147 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ruimarinho/bitcoin-core 2 | 3 | A bitcoin-core docker image with support for the following platforms: 4 | 5 | * `amd64` (x86_64) 6 | * `arm32v7` (armv7) 7 | * `arm64` (aarch64, armv8) 8 | 9 | [![ruimarinho/bitcoin-core][docker-pulls-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-stars-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-size-image]][docker-hub-url] 10 | 11 | ## Tags 12 | 13 | - `24.0.1`, `24`, `latest` ([24/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/24/Dockerfile)) [**multi-arch**] 14 | - `24.0.1-alpine`, `24-alpine` ([24/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/24/alpine/Dockerfile)) 15 | 16 | - `23.0`, `23` ([23/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/23/Dockerfile)) [**multi-arch**] 17 | - `23.0-alpine`, `23-alpine` ([23/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/23/alpine/Dockerfile)) 18 | 19 | - `22.0`, `22`, ([22/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/22/Dockerfile)) [**multi-arch**] 20 | - `22.0-alpine`, `22-alpine` ([22/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/22/alpine/Dockerfile)) 21 | 22 | - `0.21.1`, `0.21` ([0.21/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.21/Dockerfile)) [**multi-arch**] 23 | - `0.21.1-alpine`, `0.21-alpine` ([0.21/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.21/alpine/Dockerfile)) 24 | 25 | - `0.20.1`, `0.20` ([0.20/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.20/Dockerfile)) [**multi-arch**] 26 | - `0.20.1-alpine`, `0.20-alpine` ([0.20/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.20/alpine/Dockerfile)) 27 | 28 | - `0.19.1`, `0.19` ([0.19/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.19/Dockerfile)) [**multi-arch**] 29 | - `0.19.1-alpine`, `0.19-alpine` ([0.19/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.19/alpine/Dockerfile)) 30 | 31 | - `0.18.1`, `0.18`, ([0.18/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.18/Dockerfile)) 32 | - `0.18.1-alpine`, `0.18-alpine` ([0.18/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.18/alpine/Dockerfile)) 33 | 34 | - `0.17.1`, `0.17` ([0.17/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.17/Dockerfile)) 35 | - `0.17.1-alpine`, `0.17-alpine` ([0.17/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.17/alpine/Dockerfile)) 36 | 37 | - `0.16.3`, `0.16` ([0.16/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.16/Dockerfile)) 38 | - `0.16.3-alpine`, `0.16-alpine` ([0.16/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.16/alpine/Dockerfile)) 39 | 40 | - `0.15.1`, `0.15` ([0.15/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.15/Dockerfile)) 41 | - `0.15.1-alpine`, `0.15-alpine` ([0.15/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.15/alpine/Dockerfile)) 42 | 43 | **Multi-architecture builds** 44 | 45 | The newest images (Debian-based, *0.19+*) provide built-in support for multiple architectures. Running `docker pull` on any of the supported platforms will automatically choose the right image for you as all of the manifests and artifacts are pushed to the Docker registry. 46 | 47 | **Picking the right tag** 48 | 49 | - `ruimarinho/bitcoin-core:latest`: points to the latest stable release available of Bitcoin Core. Caution when using in production as blindly upgrading Bitcoin Core is a risky procedure. 50 | - `ruimarinho/bitcoin-core:alpine`: same as above but using the Alpine Linux distribution (a resource efficient Linux distribution with security in mind, but not officially supported by the Bitcoin Core team — use at your own risk). 51 | - `ruimarinho/bitcoin-core:`: based on a slim Debian image, this tag format points to a specific version branch (e.g. `0.20`) or release of Bitcoin Core (e.g. `0.20.1`). Uses the pre-compiled binaries which are distributed by the Bitcoin Core team. 52 | - `ruimarinho/bitcoin-core:-alpine`: same as above but using the Alpine Linux distribution. 53 | 54 | ## What is Bitcoin Core? 55 | 56 | Bitcoin Core is a reference client that implements the Bitcoin protocol for remote procedure call (RPC) use. It is also the second Bitcoin client in the network's history. Learn more about Bitcoin Core on the [Bitcoin Developer Reference docs](https://bitcoin.org/en/developer-reference). 57 | 58 | ## Usage 59 | 60 | ### How to use this image 61 | 62 | This image contains the main binaries from the Bitcoin Core project - `bitcoind`, `bitcoin-cli` and `bitcoin-tx`. It behaves like a binary, so you can pass any arguments to the image and they will be forwarded to the `bitcoind` binary: 63 | 64 | ```sh 65 | ❯ docker run --rm -it ruimarinho/bitcoin-core \ 66 | -printtoconsole \ 67 | -regtest=1 \ 68 | -rpcallowip=172.17.0.0/16 \ 69 | -rpcauth='foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc' 70 | ``` 71 | 72 | _Note: [learn more](#using-rpcauth-for-remote-authentication) about how `-rpcauth` works for remote authentication._ 73 | 74 | By default, `bitcoind` will run as user `bitcoin` in the group `bitcoin` for security reasons and with its default data dir set to `~/.bitcoin`. If you'd like to customize where `bitcoin-core` stores its data, you must use the `BITCOIN_DATA` environment variable. The directory will be automatically created with the correct permissions for the `bitcoin` user and `bitcoind` automatically configured to use it. 75 | 76 | ```sh 77 | ❯ docker run --env BITCOIN_DATA=/var/lib/bitcoin-core --rm -it ruimarinho/bitcoin-core \ 78 | -printtoconsole \ 79 | -regtest=1 80 | ``` 81 | 82 | You can also mount a directory in a volume under `/home/bitcoin/.bitcoin` in case you want to access it on the host: 83 | 84 | ```sh 85 | ❯ docker run -v ${PWD}/data:/home/bitcoin/.bitcoin -it --rm ruimarinho/bitcoin-core \ 86 | -printtoconsole \ 87 | -regtest=1 88 | ``` 89 | 90 | You can optionally create a service using `docker-compose`: 91 | 92 | ```yml 93 | bitcoin-core: 94 | image: ruimarinho/bitcoin-core 95 | command: 96 | -printtoconsole 97 | -regtest=1 98 | ``` 99 | 100 | ### Using a custom user id (UID) and group id (GID) 101 | 102 | By default, images are created with a `bitcoin` user/group using a static UID/GID (`101:101` on Debian and `100:101` on Alpine). You may customize the user and group ids using the build arguments `UID` (`--build-arg UID=`) and `GID` (`--build-arg GID=`). 103 | 104 | If you'd like to use the pre-built images, uou can also customize the UID/GID on runtime via environment variables `$UID` and `$GID`: 105 | 106 | ```sh 107 | ❯ docker run -e UID=10000 -e GID=10000 -it --rm ruimarinho/bitcoin-core \ 108 | -printtoconsole \ 109 | -regtest=1 110 | ``` 111 | 112 | This will recursively change the ownership of the `bitcoin` home directory and `$BITCOIN_DATA` to UID/GID `10000:10000`. 113 | 114 | ### Using RPC to interact with the daemon 115 | 116 | There are two communications methods to interact with a running Bitcoin Core daemon. 117 | 118 | The first one is using a cookie-based local authentication. It doesn't require any special authentication information as running a process locally under the same user that was used to launch the Bitcoin Core daemon allows it to read the cookie file previously generated by the daemon for clients. The downside of this method is that it requires local machine access. 119 | 120 | The second option is making a remote procedure call using a username and password combination. This has the advantage of not requiring local machine access, but in order to keep your credentials safe you should use the newer `rpcauth` authentication mechanism. 121 | 122 | #### Using cookie-based local authentication 123 | 124 | Start by launch the Bitcoin Core daemon: 125 | 126 | ```sh 127 | ❯ docker run --rm --name bitcoin-server -it ruimarinho/bitcoin-core \ 128 | -printtoconsole \ 129 | -regtest=1 130 | ``` 131 | 132 | Then, inside the running `bitcoin-server` container, locally execute the query to the daemon using `bitcoin-cli`: 133 | 134 | ```sh 135 | ❯ docker exec --user bitcoin bitcoin-server bitcoin-cli -regtest getmininginfo 136 | 137 | { 138 | "blocks": 0, 139 | "currentblocksize": 0, 140 | "currentblockweight": 0, 141 | "currentblocktx": 0, 142 | "difficulty": 4.656542373906925e-10, 143 | "errors": "", 144 | "networkhashps": 0, 145 | "pooledtx": 0, 146 | "chain": "regtest" 147 | } 148 | ``` 149 | 150 | In the background, `bitcoin-cli` read the information automatically from `/home/bitcoin/.bitcoin/regtest/.cookie`. In production, the path would not contain the regtest part. 151 | 152 | #### Using rpcauth for remote authentication 153 | 154 | Before setting up remote authentication, you will need to generate the `rpcauth` line that will hold the credentials for the Bitcoind Core daemon. You can either do this yourself by constructing the line with the format `:$` or use the official [`rpcauth.py`](https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py) script to generate this line for you, including a random password that is printed to the console. 155 | 156 | _Note: This is a Python 3 script. use `[...] | python3 - ` when executing on macOS._ 157 | 158 | Example: 159 | 160 | ```sh 161 | ❯ curl -sSL https://raw.githubusercontent.com/bitcoin/bitcoin/master/share/rpcauth/rpcauth.py | python - 162 | 163 | String to be appended to bitcoin.conf: 164 | rpcauth=foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc 165 | Your password: 166 | qDDZdeQ5vw9XXFeVnXT4PZ--tGN2xNjjR4nrtyszZx0= 167 | ``` 168 | 169 | Note that for each run, even if the username remains the same, the output will be always different as a new salt and password are generated. 170 | 171 | Now that you have your credentials, you need to start the Bitcoin Core daemon with the `-rpcauth` option. Alternatively, you could append the line to a `bitcoin.conf` file and mount it on the container. 172 | 173 | Let's opt for the Docker way: 174 | 175 | ```sh 176 | ❯ docker run --rm --name bitcoin-server -it ruimarinho/bitcoin-core \ 177 | -printtoconsole \ 178 | -regtest=1 \ 179 | -rpcallowip=172.17.0.0/16 \ 180 | -rpcauth='foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc' 181 | ``` 182 | 183 | Two important notes: 184 | 185 | 1. Some shells require escaping the rpcauth line (e.g. zsh), as shown above. 186 | 2. It is now perfectly fine to pass the rpcauth line as a command line argument. Unlike `-rpcpassword`, the content is hashed so even if the arguments would be exposed, they would not allow the attacker to get the actual password. 187 | 188 | You can now connect via `bitcoin-cli` or any other [compatible client](https://github.com/ruimarinho/bitcoin-core). You will still have to define a username and password when connecting to the Bitcoin Core RPC server. 189 | 190 | To avoid any confusion about whether or not a remote call is being made, let's spin up another container to execute `bitcoin-cli` and connect it via the Docker network using the password generated above: 191 | 192 | ```sh 193 | ❯ docker run -it --link bitcoin-server --rm ruimarinho/bitcoin-core \ 194 | bitcoin-cli \ 195 | -rpcconnect=bitcoin-server \ 196 | -regtest \ 197 | -rpcuser=foo\ 198 | -stdinrpcpass \ 199 | getbalance 200 | ``` 201 | 202 | Enter the password `qDDZdeQ5vw9XXFeVnXT4PZ--tGN2xNjjR4nrtyszZx0=` and hit enter: 203 | 204 | ``` 205 | 0.00000000 206 | ``` 207 | 208 | Note: under Bitcoin Core < 0.16, use `-rpcpassword="qDDZdeQ5vw9XXFeVnXT4PZ--tGN2xNjjR4nrtyszZx0="` instead of `-stdinrpcpass`. 209 | 210 | Done! 211 | 212 | ### Exposing Ports 213 | 214 | Depending on the network (mode) the Bitcoin Core daemon is running as well as the chosen runtime flags, several default ports may be available for mapping. 215 | 216 | Ports can be exposed by mapping all of the available ones (using `-P` and based on what `EXPOSE` documents) or individually by adding `-p`. This mode allows assigning a dynamic port on the host (`-p `) or assigning a fixed port `-p :`. 217 | 218 | Example for running a node in `regtest` mode mapping JSON-RPC/REST (18443) and P2P (18444) ports: 219 | 220 | ```sh 221 | docker run --rm -it \ 222 | -p 18443:18443 \ 223 | -p 18444:18444 \ 224 | ruimarinho/bitcoin-core \ 225 | -printtoconsole \ 226 | -regtest=1 \ 227 | -rpcallowip=172.17.0.0/16 \ 228 | -rpcbind=0.0.0.0 \ 229 | -rpcauth='foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc' 230 | ``` 231 | 232 | To test that mapping worked, you can send a JSON-RPC curl request to the host port: 233 | 234 | ``` 235 | curl --data-binary '{"jsonrpc":"1.0","id":"1","method":"getnetworkinfo","params":[]}' http://foo:qDDZdeQ5vw9XXFeVnXT4PZ--tGN2xNjjR4nrtyszZx0=@127.0.0.1:18443/ 236 | ``` 237 | 238 | #### Mainnet 239 | 240 | - JSON-RPC/REST: 8332 241 | - P2P: 8333 242 | 243 | #### Testnet 244 | 245 | - Testnet JSON-RPC: 18332 246 | - P2P: 18333 247 | 248 | #### Regtest 249 | 250 | - JSON-RPC/REST: 18443 (_since 0.16+_, otherwise _18332_) 251 | - P2P: 18444 252 | 253 | #### Signet 254 | 255 | - JSON-RPC/REST: 38332 256 | - P2P: 38333 257 | 258 | ## Archived tags 259 | 260 | _Please note that due to [CVE-2018-17144](https://nvd.nist.gov/vuln/detail/CVE-2018-17144), the following tags are unavailable: 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.15.0.1, 0.15.1, 0.16.0, 0.16.1 and 0.16.2._ 261 | 262 | For historical reasons, the following tags are still available and automatically updated when the underlying base image (_Alpine Linux_ or _Debian stable_) is updated as well: 263 | 264 | - `0.13.2`, `0.13` ([0.13/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.13/Dockerfile)) 265 | - `0.13.2-alpine`, `0.13-alpine` ([0.13/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.13/alpine/Dockerfile)) 266 | 267 | - `0.12.1`, `0.12` ([0.12/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.12/Dockerfile)) 268 | - `0.12.1-alpine`, `0.12-alpine` ([0.12/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.12/alpine/Dockerfile)) 269 | 270 | - `0.11.2`, `0.11` ([0.11/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.11/Dockerfile)) 271 | - `0.11.2-alpine`, `0.11-alpine` ([0.11/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.11/alpine/Dockerfile)) 272 | 273 | ## Docker 274 | 275 | This image is officially supported on Docker version 17.09, with support for older versions provided on a best-effort basis. 276 | 277 | ## License 278 | 279 | [License information](https://github.com/bitcoin/bitcoin/blob/master/COPYING) for the software contained in this image. 280 | 281 | [License information](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/LICENSE) for the [ruimarinho/docker-bitcoin-core][docker-hub-url] docker project. 282 | 283 | [docker-hub-url]: https://hub.docker.com/r/ruimarinho/bitcoin-core 284 | [docker-pulls-image]: https://img.shields.io/docker/pulls/ruimarinho/bitcoin-core.svg?style=flat-square 285 | [docker-size-image]: https://img.shields.io/docker/image-size/ruimarinho/bitcoin-core?style=flat-square 286 | [docker-stars-image]: https://img.shields.io/docker/stars/ruimarinho/bitcoin-core.svg?style=flat-square 287 | --------------------------------------------------------------------------------