NODE_CONFIG: unbound variable error trying to run inputoutput/cardano-node:1.35.3-new docker container [SOLVED]

Hello all,

I have been trying to set up a docker container running the latest release of Cardano Node in order to be able to spin up a stake pool operation on Pre-Prod Testnet.

I tried using the following command to set this up:

sudo docker run --user 0 -e NETWORK=preprod -v cardano-bpnode-ipc:/ipc -v cardano-bpnode-data:/data -e DATA_DIR=/data -e CARDANO_NODE_SOCKET_PATH=/ipc/node.socket inputoutput/cardano-node:1.35.3-new

NB: I had to force the use of user 0 as a previous issue was that docker was not able to get permissions to create the files within the container on the volumes created for it.

When I tried to run this command to start running my Node I got the following error:

/nix/store/srm7rn76x2db1a6xg0bihz6vngz5a7km-entrypoint/bin/entrypoint: line 228: NODE_CONFIG: unbound variable

I have been trying to ask on the IOHK Discord for advice on how to handle this error, but have so far had no response.

I am posting the request for assistance here also, as I cannot find any mention of this error anywhere else online.

I am hoping someone will be able to point me in the right direction to be able to actually spin up my container.

Thank you kindly in advance.

1 Like

SOLUTION - Requires replacing NETWORK with ENVIRONMENT on the list of options.

I would add a bit more details. From hareem_wave:

To anyone using 1.35.3-new Docker image. Quite a few things have changed around the container usage. Instead of using the run command to pass arguments to start the node, we instead now pass environment variables to the container. Here are some of the important ones; ENVIRONMENT, DATA_DIR, DB_DIR, SOCKET_PATH, HOST_ADDR, PORT, NODE_CONFIG, NODE_TOPOLOGY.

The DATA_DIR is the main volume that is mounted that the container will use to write config files, etc.
DATA_DIR and ENVIRONMENT seem to be the minimum required. The container will use sensible default directories within DATA_DIR for the database, socket, config, and topology files

docker-compose example:

version: '3.8'

services:   
  node:
    container_name: your_relay_name
    image: inputoutput/cardano-node:1.35.3-new
    restart: unless-stopped
    volumes:
      - /path/to/your/data/dir/:/data
    user: 0:0
    environment:
      - ENVIRONMENT=preprod
      - DATA_DIR=/data
    networks:
      - my-network

  cli:
    container_name: your_cli_name
    image: inputoutput/cardano-node:1.35.3-new
    restart: unless-stopped
    volumes:
      - /path/to/your/data/dir/:/data
    user: 0:0
    environment:
      - ENVIRONMENT=preprod
      - DATA_DIR=/data
      - CARDANO_NODE_SOCKET_PATH=/data/node.socket
      - DEBUG_SLEEP=6000
    networks:
      - my-network

networks:
  my-network:
    name: my-network
1 Like