Here is how to build your images, run the din-node container, and monitor Docker in real time.
-
Navigate to the node docker directory:
cd /path/to/devnet/dincli/docker/node -
Configure the environment file: Copy the example file to
.env:cp .env.example .env
-
Edit
.envand fill in your host values:DIN_STATE_DIR: Set this to an absolute path on your host (e.g.,/home/<user>/.din-node).DOCKER_GID: Retrieve the GID of/var/run/docker.sockby running:stat -c '%g' /var/run/docker.sockDIN_UID/DIN_GID: Retrieve your host user's UID and GID by running:id -u id -g
-
Create the state directory and set proper ownership:
source .env mkdir -p "$DIN_STATE_DIR" sudo chown -R "$DIN_UID:$DIN_GID" "$DIN_STATE_DIR"
-
Pre-build the Worker Image (
din-worker:dev): Run the build from the repository root/path/to/devnet. Doing this on the host is highly recommended to speed up execution:cd /path/to/devnet docker build -f dincli/docker/worker/Dockerfile -t din-worker:dev .
-
Build the Node Image (
din-node:dev): Navigate back and build thedin-nodecontainer using Docker Compose:cd /path/to/devnet/dincli/docker/node docker compose build
-
Start the container in detached mode:
docker compose up -d
-
Verify it is running:
docker compose ps
-
Initialize and configure
dincliinside the container:# Initialize system docker compose exec din-node dincli system init # Set the network docker compose exec din-node dincli system configure-network --network sepolia_devnet # Configure and connect a demo wallet (or use register-wallet for your own keys) docker compose exec din-node dincli system configure-demo --mode yes docker compose exec din-node dincli system connect-demo-wallet --account 0
Production validators: Import an encrypted keystore instead of demo mode. See wallet-setup.md and keystore-migration.md.
Choose one or more of these options to monitor activity:
-
Monitor
din-nodelogs in real time:docker compose logs -f din-node
-
Monitor container lists in real time (shows active jobs/workers):
watch -n 1 'docker ps -a --filter "name=din-"' -
Monitor CPU, memory, and network usage in real time:
docker stats
-
Monitor Docker daemon engine events (creations, destructions, and starts):
docker events
in ~/.din-node
run
cd ~/.din-node
mkdir hardhat
cd hardhat
npm init
npm install hardhat --save-dev
npx hardhat init
mkdir contracts
- dincli/docker/node/README.md — The operator runbook with architecture overview and commands.
- dincli/docker/node/Dockerfile — Standard multi-stage build configuration mapping
dinclicontrol plane. - dincli/docker/node/docker-compose.yml — Compose specification detailing environment variable interpolation and bind mounts.