**Motivations:** - Add API services for anchorage and faucet functionality - Add dashboard interface for signet monitoring - Improve documentation and maintenance guides - Enhance existing scripts for better functionality **Root causes:** - Need for API services to interact with Bitcoin Signet - Need for user-friendly dashboard interface - Need for comprehensive documentation - Scripts required improvements for better reliability **Correctifs:** - Updated Dockerfile with better configuration - Improved gen-bitcoind-conf.sh and gen-signet-keys.sh scripts - Enhanced mine.sh, miner, run.sh, and setup-signet.sh scripts - Updated env.example with new configuration options **Evolutions:** - Added api-anchorage service with anchor functionality - Added api-faucet service for testnet coin distribution - Added signet-dashboard for monitoring and management - Added comprehensive documentation in docs/ directory - Added configure-nginx-proxy.sh for proxy configuration - Added update-signet.sh for signet updates - Added ETAT_SYSTEME.md and START_DASHBOARD_AND_FAUCET.md guides - Added .bitcoin-version file for version tracking **Pages affectées:** - Dockerfile - env.example - gen-bitcoind-conf.sh - gen-signet-keys.sh - mine.sh - miner - run.sh - setup-signet.sh - api-anchorage/ (new) - api-faucet/ (new) - signet-dashboard/ (new) - docs/ (new) - configure-nginx-proxy.sh (new) - update-signet.sh (new) - ETAT_SYSTEME.md (new) - START_DASHBOARD_AND_FAUCET.md (new) - .bitcoin-version (new) - .env (modified) - mempool/ (added)
78 lines
2.6 KiB
Docker
78 lines
2.6 KiB
Docker
FROM debian:bookworm-slim as builder
|
|
|
|
ARG BITCOIN_VERSION=${BITCOIN_VERSION:-30.2}
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu wget libc6 procps python3
|
|
WORKDIR /tmp
|
|
|
|
# Install Bitcoin binaries based on platform
|
|
RUN ARCH=$(uname -m) && \
|
|
case $ARCH in \
|
|
x86_64) export TRIPLET="x86_64-linux-gnu";; \
|
|
aarch64) export TRIPLET="aarch64-linux-gnu";; \
|
|
*) echo "Unsupported architecture: $ARCH" && exit 1;; \
|
|
esac && \
|
|
BITCOIN_URL="https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TRIPLET}.tar.gz" && \
|
|
BITCOIN_FILE="bitcoin-${BITCOIN_VERSION}-${TRIPLET}.tar.gz" && \
|
|
wget -qO "${BITCOIN_FILE}" "${BITCOIN_URL}" && \
|
|
mkdir -p bin && \
|
|
tar -xzvf "${BITCOIN_FILE}" -C /tmp/bin --strip-components=2 "bitcoin-${BITCOIN_VERSION}/bin/bitcoin-cli" "bitcoin-${BITCOIN_VERSION}/bin/bitcoind" "bitcoin-${BITCOIN_VERSION}/bin/bitcoin-wallet" "bitcoin-${BITCOIN_VERSION}/bin/bitcoin-util"
|
|
|
|
FROM debian:bookworm-slim as custom-signet-bitcoin
|
|
|
|
|
|
ENV BITCOIN_DIR /root/.bitcoin
|
|
|
|
ENV NBITS=${NBITS}
|
|
ENV SIGNETCHALLENGE=${SIGNETCHALLENGE}
|
|
ENV PRIVKEY=${PRIVKEY}
|
|
|
|
ENV RPCUSER=${RPCUSER:-"bitcoin"}
|
|
ENV RPCPASSWORD=${RPCPASSWORD:-"bitcoin"}
|
|
ENV COOKIEFILE=${COOKIEFILE:-"false"}
|
|
ENV I2PSAM=${I2PSAM:-""}
|
|
|
|
ENV UACOMMENT=${UACOMMENT:-"CustomSignet"}
|
|
ENV ZMQPUBRAWBLOCK=${ZMQPUBRAWBLOCK:-"tcp://0.0.0.0:28332"}
|
|
ENV ZMQPUBRAWTX=${ZMQPUBRAWTX:-"tcp://0.0.0.0:28333"}
|
|
ENV ZMQPUBHASHBLOCK=${ZMQPUBHASHBLOCK:-"tcp://0.0.0.0:28334"}
|
|
|
|
ENV RPCBIND=${RPCBIND:-"0.0.0.0:38332"}
|
|
ENV RPCALLOWIP=${RPCALLOWIP:-"0.0.0.0/0"}
|
|
ENV WHITELIST=${WHITELIST:-"0.0.0.0/0"}
|
|
ENV ADDNODE=${ADDNODE:-""}
|
|
ENV BLOCKPRODUCTIONDELAY=${BLOCKPRODUCTIONDELAY:-""}
|
|
ENV MINERENABLED=${MINERENABLED:-"1"}
|
|
ENV MINETO=${MINETO:-""}
|
|
ENV EXTERNAL_IP=${EXTERNAL_IP:-""}
|
|
|
|
VOLUME $BITCOIN_DIR
|
|
EXPOSE 28332 28333 28334 38332 38333 38334
|
|
RUN apt-get update && \
|
|
apt-get install -qq --no-install-recommends procps python3 python3-pip python3-setuptools jq && \
|
|
apt-get clean
|
|
COPY --from=builder "/tmp/bin" /usr/local/bin
|
|
COPY docker-entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
COPY install.sh /usr/local/bin/install.sh
|
|
RUN chmod +x /usr/local/bin/install.sh
|
|
|
|
COPY miner /usr/local/bin/miner
|
|
RUN chmod +x /usr/local/bin/miner
|
|
|
|
COPY miner_imports /usr/local/bin/miner_imports
|
|
RUN chmod -R +x /usr/local/bin/miner_imports
|
|
|
|
COPY *.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/*.sh
|
|
COPY rpcauth.py /usr/local/bin/rpcauth.py
|
|
RUN chmod +x /usr/local/bin/rpcauth.py
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
|
|
CMD ["run.sh"]
|