0

The dockerized version of cardano-node version 1.35.3 connects to the mainnet by default. We wish to connect the node to the new pre-production or preview testnets. It isn't made clear in any documentation how to accomplish this.

For reference, I'm referring to this image: https://hub.docker.com/r/inputoutput/cardano-node

This is related to What are the valid NETWORK values for docker node images?

3 Answers 3

1

A solution, involving setting up a new docker image, can be found here: https://cardano.stackexchange.com/a/8940/7460

1

Here's how I solved it:

Get the config files from here: https://book.world.dev.cardano.org/environments/preprod/

Place the config files in $PWD/config/docker_configs/preprod where $PWD is the dir containing your compose.

docker-compose.yml

  cardano-node-testnet:
    image: inputoutput/cardano-node:1.35.3
    container_name: cardano_node_testnet
    volumes:
      - node-testnet-db:/data/db
      - node-ipc:/ipc
      - $PWD/config/docker_configs/preprod:/config
    command:
      - run
      - --config /config/config.json
      - --topology /config/topology.json
      - --database-path /data/db
      - --socket-path /ipc/node.socket
    restart: on-failure
    healthcheck:
      # Ping the EKG port to see if it responds.
      # Assuming if EKG isn't up then the rest of cardano-node isn't either.
      test: [ "CMD-SHELL", "curl -f 127.0.0.1:12788 || exit 1" ]
      interval: 60s
      timeout: 10s
      retries: 5
    logging:
      driver: "json-file"
      options:
        compress: "true"
        max-file: "10"
        max-size: "50m"

Thanks to adamuso on the iohk discord for the help.

0

Please check my post in cardano forum here:

https://forum.cardano.org/t/relay-node-in-docker/102416/2?u=os11k

Basically you need to run it in docker compose, config files should be under ./node-config on host server. Keep in mind in my example I use testnet-config.json & testnet-topology.json as file names, you can change them in Dockerfile.

And you need to have Dockerfile in same dir where is docker-compose.yml

FROM inputoutput/cardano-node:1.35.3
ENV CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
ENTRYPOINT ["/usr/local/bin/cardano-node", "run", "+RTS", "-N", "-A16m", "-qg", "-qb", "-RTS", "--topology", "/config/testnet-topology.json", "--database-path", "/data/db", "--socket-path", "/ipc/node.socket", "--host-addr", "0.0.0.0", "--port", "6001", "--config", "/config/testnet-config.json" ]

That should make it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.