Sign inSign up

blockblu/cardano-node

By blockblu

•Updated over 3 years ago

Image
0

1.6K

blockblu/cardano-node repository overview

⁠Quick reference

⁠Cardano Node Container

This repository maintains an unofficial Dockerfile for the cardano-node⁠ software based on Ubuntu. It follows the guide⁠ by IOHK outlining how to compile the cardano node software on Linux distributions.

⁠Running

The image contains the cardano-node as well as the cardano-cli executable. The default entrypoint points to the cardano-node executable.

⁠Cardano Node
docker run blockblu/cardano-node:u1.30.1 --help
⁠Healthcheck

The image contains a small Go program for checking the health of a cardano-node. The program gathers information from the Prometheus endpoint of the node and concludes whether it is healthy based on specified thresholds.

ArgumentExpected ValueDescription
-max-time-since-last-blockduration (e.g. 5m for 5 minutes)specifies how long a cardano-node can be inable to fetch the most recently minted block

Example:

healthcheck -max-time-since-last-block 5m
⁠Cardano CLI
docker run --entrypoint "cardano-cli" blockblu/cardano-node:1.30.1 --help

⁠Where to store your data?

There are several ways to store data used by applications that run in Docker containers. We encourage users of the cardano-node images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your blockchain data by writing the database files to disk on the host system using its own internal volume management. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.

  • Create a data directory on the host system (outside the container) and mount this to a directory visible from inside the container. This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /my/own/cardano-node/data.
  2. Start your cardano-node container like this, depending on how you have specified the database path: docker run -v /my/own/cardano-node/data:/data blockblu/cardano-node:tag --database-path /data ...

Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to the new data directory so that the container will be allowed to access it:

chcon -Rt svirt_sandbox_file_t /my/own/cardano-node/data

Tag summary

Content type

Image

Digest

sha256:4ab6f5388…

Size

91.8 MB

Last updated

over 3 years ago

docker pull blockblu/cardano-node:u1.35.7