mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 10:28:10 +01:00
Add bitcoincash support for prepare and run scripts, add bitcoincash to testing suite, groundwork for bch-xmr atomic swap protocol
This commit is contained in:
27
docker/production/bitcoincash/Dockerfile
Normal file
27
docker/production/bitcoincash/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
# https://github.com/NicolasDorier/docker-bitcoin/blob/master/README.md
|
||||
|
||||
FROM i_swapclient as install_stage
|
||||
|
||||
RUN basicswap-prepare --preparebinonly --bindir=/coin_bin --withcoin=bitcoincash --withoutcoins=particl && \
|
||||
find /coin_bin -name *.tar.gz -delete
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
COPY --from=install_stage /coin_bin .
|
||||
|
||||
ENV BITCOIN_DATA /data
|
||||
|
||||
RUN groupadd -r bitcoin && useradd -r -m -g bitcoin bitcoin \
|
||||
&& apt-get update \
|
||||
&& apt-get install -qq --no-install-recommends gosu \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir "$BITCOIN_DATA" \
|
||||
&& chown -R bitcoin:bitcoin "$BITCOIN_DATA" \
|
||||
&& ln -sfn "$BITCOIN_DATA" /home/bitcoin/.bitcoin \
|
||||
&& chown -h bitcoin:bitcoin /home/bitcoin/.bitcoin
|
||||
VOLUME /data
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
EXPOSE 8332 8333 18332 18333 18443 18444
|
||||
CMD ["/bitcoin/bitcoind", "--datadir=/data"]
|
||||
11
docker/production/bitcoincash/entrypoint.sh
Executable file
11
docker/production/bitcoincash/entrypoint.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "$1" == "bitcoin-cli" || "$1" == "bitcoin-tx" || "$1" == "bitcoind" || "$1" == "test_bitcoin" ]]; then
|
||||
mkdir -p "$BITCOIN_DATA"
|
||||
|
||||
chown -h bitcoin:bitcoin /home/bitcoin/.bitcoin
|
||||
exec gosu bitcoin "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
@@ -21,6 +21,12 @@ BTC_RPC_PORT=19796
|
||||
BTC_RPC_USER=bitcoin_user
|
||||
BTC_RPC_PWD=bitcoin_pwd
|
||||
|
||||
BCH_DATA_DIR=/data/bitcoincash
|
||||
BCH_RPC_HOST=bitcoincash_core
|
||||
BCH_RPC_PORT=19797
|
||||
BCH_RPC_USER=bitcoincash_user
|
||||
BCH_RPC_PWD=bitcoincash_pwd
|
||||
|
||||
LTC_DATA_DIR=/data/litecoin
|
||||
LTC_RPC_HOST=litecoin_core
|
||||
LTC_RPC_PORT=19795
|
||||
|
||||
Reference in New Issue
Block a user