ℹ️ We provide installation instructions using pre-built Docker images if you just want to setup and use a Docker-based node.
These advanced instructions are intended for developers who want to build their own custom Docker image. You can also build a binary using Golang, or run a Docker-based localnet.
Install Docker pre-requisites below, either as individual installs or using Docker Desktop (if running on a developer machine):
Docker Engine v20.10.x and above (use docker -v
to check)
Docker Compose v2.3.x and above (use docker compose version
to check)
Our Docker Compose files use Compose v2 syntax. The primary difference in usage is that Docker Compose's new implementation uses docker compose
commands (with a space), rather than the legacy docker-compose
although they are supposed to be drop-in replacements for each other.
Most issues with Docker that get raised with us are typically with developers running Mac OS with Apple M-series chips, which Docker has special guidance for.
Other issues are due to developers using the legacy docker-compose
CLI rather than the new docker compose
CLI. If your issues are specifically with Docker Compose, make sure the command used is docker compose
(with a space).
Clone the cheqd-node
repository from Github. (Github has instructions on how to clone a repo.)
Inspect the Dockerfile to understand build arguments and variables. This is only really necessary if you want to modify the Docker build.
Or, If you want to use Docker buildx
engine, look at the usage/configuration in our Github build workflow.
Note: If you're building on a Mac OS system with Apple M-series chips, you should modify the
FROM
statement in the Dockerfile toFROM --platform=linux/amd64 golang:1.18-alpine AS builder
. Otherwise, Docker will try to download the Mac OSdarwin
image for the base Golang image and fail during the build process.
If you're planning on passing/modifying a lot of build arguments from their defaults, you can modify the Docker Compose file and the associated environment files to define the build/run-time variables in a one place. This is the recommended method.
Note that a valid Docker Compose file will only have one build
and image
section, so modify/comment this as necessary. See our instructions for how to use Docker Compose for mainnet/testnet to understand how this works.
Sample command (modify as necessary):
If you don't want to use docker compose build
, or build using docker build
and then run it using Docker Compose, a sample command you could use is (modify as necessary)
Once you built a Docker image, you can:
Configure a Docker-based node installation for mainnet/testnet
Run a localnet using this custom Docker image