user151: 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

user7757: 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

user7460: 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)

151: <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>
 7757: <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>
 7460: <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>
