Docker "build environment" of cardano-node and cardano-cli

Hi all,

because I’m lazy and I like predictable outcomes:

I hope this can help

Cheers

2 Likes

the README could be helpful. here it is:

README

At the minute, the only way to install the cardano-node and the cardano-cli, necessary to run a stake pool on Shelley, is to compile them. Compilation can be troublesome for some and lead to issues. To reduce complexity and have predictable results, I use a Docker build environment. This setup will always to build against the latest cardano-node version and pioneer-* tag as in the official documentation.

IMPORTANT: you must run these steps to compile cardano-node and cardano-cli on your local computer, and copy them over to your servers. This is to avoid useless load and installing compilation software on your servers.
install docker

Install and run Docker Desktop for your OS from the official site, on your local computer.
clone the build repo

git clone https://github.com/gacallea/cardanoNodeBuilder.git

compile the software

cd cardanoNodeBuilder
docker-compose up --build -d

copy the binaries to your host

docker container cp build_builder_1:/usr/local/bin cardano-bins/

scp the binaries to your nodes

NOTE: Make sure you point to your actual servers.

scp cardano-bins/bin/cardano-node node-server:/usr/local/bin/
scp cardano-bins/bin/cardano-cli node-server:/usr/local/bin/

scp cardano-bins/bin/cardano-node relay-server:/usr/local/bin/
scp cardano-bins/bin/cardano-cli relay-server:/usr/local/bin/

cheers

1 Like

Thanks for posting this! I have been meaning to run my nodes in a docker, provided I don’t lose on network performance.

This would be a good experiment.

thanks for your appreciation! you are welcome.

mind that this is far from being a docker environment to deploy. it is only that I don’t like doing repetitive task by hand. I’d rather script them or similar. this is just to compile cardano-node and cardano-cli for ubuntu 20.04. you can easily change the distro in the FROM instruction.

having said that, I also would like to run my shelley infrastructure on docker and with IaC, but it’s a lot to learn and I haven’t quite got there yet.