Created
January 27, 2021 15:02
-
-
Save cdecker/bd8675c4cfc9e9195f050f0a36308de1 to your computer and use it in GitHub Desktop.
Recreation of issue ElementsProject/lightning#4335
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
lightningd: | |
environment: | |
BITCOIND_RPCUSER: rpcuser | |
BITCOIND_RPCPASS: rpcpass | |
BITCOIND_RPCCONNECT: bitcoind | |
BITCOIND_RPCPORT: 8332 | |
expose: | |
- "9375/tcp" | |
build: | |
context: . | |
dockerfile: Dockerfile.lightningd | |
bitcoind: | |
environment: | |
BITCOIND_RPCUSER: rpcuser | |
BITCOIND_RPCPASS: rpcpass | |
BITCOIND_RPCPORT: 8332 | |
ports: | |
- "8332:8332" | |
build: | |
context: . | |
dockerfile: Dockerfile.bitcoind | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A bitcoind fronted by a btc-rpc-proxy so we can prune it. | |
FROM ubuntu:20.04 | |
RUN apt-get update -q \ | |
&& apt-get install -y -qq --no-install-recommends \ | |
ca-certificates \ | |
dirmngr \ | |
wget \ | |
curl \ | |
build-essential | |
ARG BITCOIN_VERSION=0.20.1 | |
ENV BITCOIN_TARBALL bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz | |
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL | |
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc | |
ENV PATH /opt/bitcoin/bin:/root/.cargo/bin/:$PATH | |
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \ | |
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \ | |
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \ | |
&& grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \ | |
&& sha256sum -c SHA256SUMS.asc \ | |
&& BD=bitcoin-$BITCOIN_VERSION/bin \ | |
&& tar -xzvf $BITCOIN_TARBALL $BD/ --strip-components=1 \ | |
&& rm $BITCOIN_TARBALL | |
VOLUME /var/run/bitcoind | |
VOLUME /etc/btc-rpc-proxy/ | |
EXPOSE 8332:8332 | |
cmd sleep 10 && bitcoind \ | |
-rpcuser=$BITCOIND_RPCUSER \ | |
-rpcport=$BITCOIND_RPCPORT \ | |
-rpcpassword=$BITCOIND_RPCPASS \ | |
-server=1 \ | |
-rpcallowip=0.0.0.0/0 \ | |
-rpcbind=0.0.0.0:8332 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
RUN apt-get update -q \ | |
&& apt-get install --yes -qq software-properties-common \ | |
&& add-apt-repository --yes --update ppa:cdecker/clightning \ | |
&& apt-get install --yes -qq lightningd wget python3 python3-pip \ | |
&& rm -rf /var/lib/apt/lists/* | |
ARG BITCOIN_VERSION=0.20.1 | |
ENV BITCOIN_TARBALL bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz | |
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL | |
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc | |
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \ | |
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \ | |
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \ | |
&& grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \ | |
&& sha256sum -c SHA256SUMS.asc \ | |
&& BD=bitcoin-$BITCOIN_VERSION/bin \ | |
&& tar -xzvf $BITCOIN_TARBALL --strip-components=1 \ | |
&& rm $BITCOIN_TARBALL | |
ENV PATH /opt/bitcoin/bin:$PATH | |
CMD bitcoin-cli -rpcconnect=$BITCOIND_RPCCONNECT -rpcuser=$BITCOIND_RPCUSER -rpcpassword=$BITCOIND_RPCPASS -rpcport=8332 -rpcwait echo hi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment