<p>In my experience IOG's bash scripts, used for running <code>cardano-node</code>, are poorly documented and have poor error handling. I suggest running <code>cardano-node</code> directly with the relevant config files:</p>
<pre><code>/usr/local/bin/cardano-node run --config $CARDANO_CONFIG --topology $CARDANO_TOPOLOGY --database-path $CARDANO_DATABASE_PATH --socket-path $CARDANO_NODE_SOCKET_PATH --host-addr 0.0.0.0 --port 3001
</code></pre>
<p>The relevant config files can be found here: <a href="https://book.world.dev.cardano.org/environments.html" rel="nofollow noreferrer">https://book.world.dev.cardano.org/environments.html</a></p>
<p>Of course you would have to change the entrypoint of the docker image. For that I suggest creating a new Dockerfile that wraps <code>inputoutput/cardano-node:latest</code>:</p>
<pre><code># syntax=docker/dockerfile:1
FROM inputoutput/cardano-node:latest

RUN mkdir -p /data/preprod
RUN mkdir -p /ipc
 
COPY ./config.json /data/preprod/config.json
COPY ./topology.json /data/preprod/topology.json
COPY ./byron-genesis.json /data/preprod/byron-genesis.json
COPY ./shelley-genesis.json /data/preprod/shelley-genesis.json
COPY ./alonzo-genesis.json /data/preprod/alonzo-genesis.json

COPY ./entrypoint /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint
ENTRYPOINT [&quot;bash&quot;, &quot;/usr/local/bin/entrypoint&quot;]
</code></pre>
<p>The <code>entrypoint</code> script should contain the first command I mentioned:</p>
<pre><code>#!/bin/bash

export CARDANO_CONFIG=/data/preprod/config.json
export CARDANO_TOPOLOGY=/data/preprod/topology.json
export CARDANO_DATABASE_PATH=/data/preprod/db
export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket

exec /usr/local/bin/cardano-node run --config $CARDANO_CONFIG --topology $CARDANO_TOPOLOGY --database-path $CARDANO_DATABASE_PATH --socket-path $CARDANO_NODE_SOCKET_PATH --host-addr 0.0.0.0 --port 3001
</code></pre>
<p>Finally build your image and run it:</p>
<pre><code>docker build -t cardano-preprodnet .
docker run -d -v cardano-node-data:/data cardano-preprodnet
</code></pre>
<p>A github repo that does precisely what I described above can be found here: <a href="https://github.com/Hyperion-BT/cardano-node-wrappers" rel="nofollow noreferrer">https://github.com/Hyperion-BT/cardano-node-wrappers</a> (disclaimer: I am the creator)</p>

CC BY-SA 4.0
2022-08-24T18:17:01.823Z
2022-08-24T19:58:24.587Z
2022-08-24T19:58:24.587Z
Christian Schmitz
<p>I was able to verify and having using docker image <code>cardano-node:1.35.3-configs</code> you can use environment variable <code>NETWORK=prepord</code></p>
<p><code>docker run -e NETWORK=preprod inputoutput/cardano-node:1.35.3-configs</code></p>

CC BY-SA 4.0
2022-11-02T15:25:05.170Z
2022-11-02T15:25:05.170Z
Grzegorz Drozda
<p>I have seen invocations of this this <code>-new</code> docker image with environment variable <code>NETWORK=preprod</code> set in the #spo-public-testnet channel on IOGs discord. However I do not have any more documentation and would like to know more about it as well.</p>

CC BY-SA 4.0
2022-08-24T13:59:22.883Z
2022-08-24T13:59:22.883Z
Sebastian Nagel
<p>Check this out:</p>
<p><a href="https://forum.cardano.org/t/how-i-run-cardano-node-in-docker/108328" rel="nofollow noreferrer">https://forum.cardano.org/t/how-i-run-cardano-node-in-docker/108328</a></p>
<p>That should give you idea how to run official IOHK docker images</p>

CC BY-SA 4.0
2022-11-03T11:33:02.310Z
2022-11-03T11:33:02.310Z
os11k
<p>I can find no documentation, nor even the original docker image file, for the cardano node docker images. We are trying to direct our node to connect to pre-production. Presumably there is a value for the <code>NETWORK</code> environment variable which corresponds to that.</p>
<p>Does anyone know where to fine an enumeration of all valid values for the <code>NETWORK</code> var?</p>
<p>For reference, I'm referring to this image: <a href="https://hub.docker.com/r/inputoutput/cardano-node" rel="nofollow noreferrer">https://hub.docker.com/r/inputoutput/cardano-node</a></p>

<cardano-node><docker>
What are the valid NETWORK values for docker node images?
# What are the valid NETWORK values for docker node images?

(Asked by: username_0 on 2022-08-23)

I can find no documentation, nor even the original docker image file, for the cardano node docker images. We are trying to direct our node to connect to pre-production. Presumably there is a value for the `NETWORK` environment variable which corresponds to that.

Does anyone know where to fine an enumeration of all valid values for the `NETWORK` var?

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

**Tags:** cardano-node, docker

---

## 4 answers

### Answer by username_1 on 2022-08-24. Score: 2

In my experience IOG's bash scripts, used for running cardano-node, are poorly documented and have poor error handling. I suggest running cardano-node directly with the relevant config files:
/usr/local/bin/cardano-node run --config $CARDANO_CONFIG --topology $CARDANO_TOPOLOGY --database-path $CARDANO_DATABASE_PATH --socket-path $CARDANO_NODE_SOCKET_PATH --host-addr 0.0.0.0 --port 3001

The relevant config files can be found here: https://book.world.dev.cardano.org/environments.html
Of course you would have to change the entrypoint of the docker image. For that I suggest creating a new Dockerfile that wraps inputoutput/cardano-node:latest:
# syntax=docker/dockerfile:1
FROM inputoutput/cardano-node:latest

RUN mkdir -p /data/preprod
RUN mkdir -p /ipc
 
COPY ./config.json /data/preprod/config.json
COPY ./topology.json /data/preprod/topology.json
COPY ./byron-genesis.json /data/preprod/byron-genesis.json
COPY ./shelley-genesis.json /data/preprod/shelley-genesis.json
COPY ./alonzo-genesis.json /data/preprod/alonzo-genesis.json

COPY ./entrypoint /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint
ENTRYPOINT ["bash", "/usr/local/bin/entrypoint"]

The entrypoint script should contain the first command I mentioned:
#!/bin/bash

export CARDANO_CONFIG=/data/preprod/config.json
export CARDANO_TOPOLOGY=/data/preprod/topology.json
export CARDANO_DATABASE_PATH=/data/preprod/db
export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket

exec /usr/local/bin/cardano-node run --config $CARDANO_CONFIG --topology $CARDANO_TOPOLOGY --database-path $CARDANO_DATABASE_PATH --socket-path $CARDANO_NODE_SOCKET_PATH --host-addr 0.0.0.0 --port 3001

Finally build your image and run it:
docker build -t cardano-preprodnet .
docker run -d -v cardano-node-data:/data cardano-preprodnet

A github repo that does precisely what I described above can be found here: https://github.com/Hyperion-BT/cardano-node-wrappers (disclaimer: I am the creator)


---

### Answer by username_2 on 2022-11-02. Score: 1

I was able to verify and having using docker image `cardano-node:1.35.3-configs` you can use environment variable `NETWORK=prepord`

`docker run -e NETWORK=preprod inputoutput/cardano-node:1.35.3-configs`


---

### Answer by username_3 on 2022-08-24. Score: 0

I have seen invocations of this this `-new` docker image with environment variable `NETWORK=preprod` set in the #spo-public-testnet channel on IOGs discord. However I do not have any more documentation and would like to know more about it as well.


---

### Answer by username_4 on 2022-11-03. Score: 0

Check this out:

<https://forum.cardano.org/t/how-i-run-cardano-node-in-docker/108328>

That should give you idea how to run official IOHK docker images


---

