Docker Community Forums

Share and learn in the Docker community.

Freewil/bitcoin-testnet-box

How this image can be launched and make a connection to blockchain?
Please help.

Dockerfile

bitcoin-testnet-box docker image

Ubuntu 14.04 LTS (Trusty Tahr)

FROM ubuntu:14.04
LABEL maintainer=“Sean Lavine lavis88@gmail.com

add bitcoind from the official PPA

install bitcoind (from PPA) and make

RUN apt-get update &&
apt-get install --yes software-properties-common &&
add-apt-repository --yes ppa:bitcoin/bitcoin &&
apt-get update &&
apt-get install --yes bitcoind make

create a non-root user

RUN adduser --disabled-login --gecos “” tester

run following commands from user’s home directory

WORKDIR /home/tester

copy the testnet-box files into the image

ADD . /home/tester/bitcoin-testnet-box

make tester user own the bitcoin-testnet-box

RUN chown -R tester:tester /home/tester/bitcoin-testnet-box

color PS1

RUN mv /home/tester/bitcoin-testnet-box/.bashrc /home/tester/ &&
cat /home/tester/.bashrc >> /etc/bash.bashrc

use the tester user when running the image

USER tester

run commands from inside the testnet-box directory

WORKDIR /home/tester/bitcoin-testnet-box

expose two rpc ports for the nodes to allow outside container access

EXPOSE 19001 19011
CMD ["/bin/bash"]

zrock23@DESKTOP-950AS07:~$ apt-get update &&

apt-get install --yes software-properties-common &&
add-apt-repository --yes ppa:bitcoin/bitcoin &&
apt-get update &&
apt-get install --yes bitcoind make
Reading package lists… Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)


there is a problem I need help! Thank you in advance!