Docker
Nethermind Dockers instructions

Docker repository

Docker repository can be found here:
Docker Hub
Nethermind Docker Hub

Supported architectures

We are currently supporting docker images for the following CPU architectures:
    AMD64
    ARM64

Using an existing image

Available tags:

Tag
Description
Architecture
latest
The latest Nethermind Debian based image
x86_64, ARM64
To use one of the previous versions you can pass {tag} e.g. 1.8.50 before the main image name.
For example, if you wish to use version 1.7.4 of Nethermind Debian image, the image name would be nethermind/nethermind:1.7.4.
All versions are available in tags history.

Running Nethermind Container

On some OS like Amazon Linux you may need to increase the nofile limit by adding the following instruction to docker commands:
1
--ulimit nofile=1000000:1000000
Copied!
e.g.
1
docker run -it --ulimit nofile=1000000:1000000 nethermind/nethermind
Copied!
Docker pull command:
Untitled
1
docker pull nethermind/nethermind
Copied!
In order to start Nethermind.Runner, simply run:
Untitled
1
docker run -it nethermind/nethermind
Copied!
You can use --help to get a list of possible start parameters for Nethermind or you can find them all here.
Untitled
1
docker run -it nethermind/nethermind --help
Copied!
It’s possible to modify each configuration property via environment variable, using a simple convention:
1
NETHERMIND_{MODULE}CONFIG_{PROPERTY} or --{Module}.{Property}
Copied!
For example:
1
NETHERMIND_INITCONFIG_ISMINING=true or --Init.IsMining
Copied!
Environment variables are to be passed before the docker image tag while parameters should be passed right after the docker image tag.
Environment variables can be easily used within docker-compose.yml files in the environment section

JSON RPC

To enable JSON RPC, share the host’s networking namespace with --network host and set--JsonRpc.Enabled true. To change port simply pass--JsonRpc.Port 8550.
If running locally:
Untitled
1
docker run -it --network host nethermind/nethermind --JsonRpc.Enabled true
Copied!
or with port-mapping
Untitled
1
docker run -it -p 8545:8545 nethermind/nethermind --JsonRpc.Enabled true --JsonRpc.Host 0.0.0.0
Copied!
If running from a VM you may want to expose JSON RPC to the outer world via --JsonRpc.Host {hostmachine_ip} (127.0.0.1 is set by default). You may try setting --JsonRpc.Host 0.0.0.0 if you still can not connect with JSON RPC.

Available configurations

To switch the network use --config {network} flag (default value is mainnet).
    mainnet
    goerli
    rinkeby
    ropsten
    xdai
    poacore
    sokol
    volta
    energyweb
For example to run Nethermind on goerli network:
Untitled
1
docker run -it nethermind/nethermind --config goerli
Copied!

Datadir

To successfully map volumes such as database, keystore, logsat one go you can use --datadir command option:
1
docker run -it -v /home/user/data:/nethermind/data nethermind/nethermind --datadir data
Copied!

Volumes

To fully override a configuration file, you need to use a volume:
1
-v /home/user/mainnet.cfg:/nethermind/configs/mainnet.cfg
Copied!
In order to map an internal database to a local volume, you need to map /nethermind/nethermind_db/:
1
-v /home/user/nethermind_db:/nethermind/nethermind_db
Copied!
Logs can be mapped with the following command:
1
-v /home/user/logs:/nethermind/logs
Copied!
Keystore:
1
-v /home/user/keystore:/nethermind/keystore
Copied!
NLog:
1
-v /home/user/NLog.config:/nethermind/NLog.config
Copied!
More detailed NLog configuration can be found here.

Building an image

Dockerfile can be found in the repository root and it currently uses the power of multi-arch builds:
File Name
Description
Architecture
requires to have a cloned repository in order to build a Debian based image
x86_64, ARM64
In order to build the images, run:
1
docker buildx build --platform=linux/amd64 -t nethermind .
Copied!
Example usage of the locally created docker-image:
1
docker run -it nethermind --config goerli
Copied!
Last modified 2mo ago