Creating a Custom Parity Docker Image

Itay Podhajcer
2 min readDec 29, 2019

Creating a custom Parity Ethereum Client Docker image is done by writing a dockerfile script. To keep things a simple as possible, I’ll be basing this article on my previous one, Running a Parity Docker Container with Custom Configuration.

TL;DR

A GitHub repository with the complete example is available here:

As in the previous article, we’ll have two directories:

  • src: will contain the configuration files
  • eng: will contain the dockerfile and a docker compose file for testing

I won’t go over generating a wallet, the chain.json and config.toml as they were already discussed in the previous article mentioned above.

The Dockerfile

We’ll start by creating a parity.dockerfile in our eng directory, and base our custom image on the official parity/parity image, so the file will start with:

Next we’ll copy the two configuration files:

Note: The paths used in the copy commands assume the docker build context will be set to the root directory

Lastly, we’ll updated the container execution command to use the configuration file we copied in the previous step:

The complete file should look like this:

Testing The Build Script

Here you have two options, either use the updated docker-compose.yml file, which now uses the dockerfile instead of the parity/parity image:

Or, use docker build to build the file:

In a “real world” scenario, we would have pushed out custom image to a repository, so it could be used by other team members or other people in general.

Sign up to discover human stories that deepen your understanding of the world.

Written by Itay Podhajcer

Tech expert with 20+ years’ experience as CTO, Chief Architect, and Consultant. 3x Microsoft MVP award winner. Passionate blogger and open-source contributor

No responses yet

Write a response