Build with Docker
Last updated
Was this helpful?
Last updated
Was this helpful?
âšī¸ We provide 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 , or .
pre-requisites below, either as individual installs or using (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 . 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 for.
Other issues are due to developers . If your issues are specifically with Docker Compose, make sure the command used is docker compose
(with a space).
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.
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:
Clone the from Github. (Github has .)
Inspect the 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 , look at the usage/configuration in .
If you're planning on passing/modifying a lot of build arguments from their defaults, you can 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 to understand how this works.
for mainnet/testnet
using this custom Docker image