Here we have some basic Docker images for testing Stratis.BitcoinD and Stratis.StratisD. The images build from the full node master on GitHub. After installing Docker, you can build and run the container with the following.
cd Stratis.StratisD
docker build .
docker run -it <containerId>
You can optionally use volumes external to the Docker container so that the blockchain does not have to sync between tests.
docker volume create stratisbitcoin
docker run --mount source=stratisbitcoin,target=/root/.stratisnode -it <containerId>
docker run --mount source=stratisbitcoin,target=/root/.stratisbitcoin -it <containerId>
When running the image, add a -p <containerPort>:<localPort>
to formward the ports:
docker run -p 37220:37220 -it <containerId>
docker build . --no-cache
Modify the Dockerfile to put the conf file in the right location and remove the "-testnet" from the run statement.
---
COPY bitcoin.conf.docker /root/.stratisnode/bitcoin/Main/bitcoin.conf
---
CMD ["dotnet", "run"]
Also remove testnet=1
from the *.docker.conf
file.