diff --git a/docs/docker/run.md b/docs/docker/run.md index bc3d9abe8..28e3dcd84 100644 --- a/docs/docker/run.md +++ b/docs/docker/run.md @@ -57,4 +57,5 @@ 1) `--entrypoint=bash` # This option won't start the node's container but only the OS running (the node software wont actually start, you'll need to manually execute entrypoint.sh ), ready to get in (trough the command ``` docker exec -it < container name or hash > /bin/bash ```) and play/explore around with it in command line mode. 2) all guild tools env variable can be used to start a new container using custom values by using the "-e" option. 3) CPU and RAM and Shared Memory allocation option for the container can be used when you start the container (i.e. --shm-size or --memory or --cpus [official docker resource docs](https://docs.docker.com/config/containers/resource_constraints/)) - 4) `--env MITHRIL_DOWNLOAD=Y` # This option will allow Mithril client to download the latest Mithril snapshot of the blockchain when the container starts and does not have a copy of the blockchain yet. This is useful when you want to start a new node from scratch and don't want to wait for the node to sync from the network. This option is only available for the mainnet, preprod, and preview networks. + 4) `--env MITHRIL_DOWNLOAD=Y` # This option will allow Mithril client to download the latest Mithril snapshot of the blockchain when the container starts and does not have a copy of the blockchain yet. This is useful when you want to start a new node from scratch and don't want to wait for the node to sync from the network. This option is not currently available for the guild network. + 5) `--env ENTRYPOINT_PROCESS=mithril-signer.sh` # This option will allow the container to start the Mithril signer process instead of the node process. This is useful when you want to run a Mithril signer node and have the container setup the configuration files based on the NETWORK environment varaible. \ No newline at end of file diff --git a/files/docker/node/addons/entrypoint.sh b/files/docker/node/addons/entrypoint.sh index 5915223f7..ed785457a 100755 --- a/files/docker/node/addons/entrypoint.sh +++ b/files/docker/node/addons/entrypoint.sh @@ -9,7 +9,10 @@ head -n 8 ~/.scripts/banner.txt # shellcheck disable=SC1090 . ~/.bashrc > /dev/null 2>&1 -echo "NETWORK: $NETWORK $POOL_NAME $TOPOLOGY"; +[[ -z "${ENTRYPOINT_PROCESS}" ]] && export ENTRYPOINT_PROCESS=cnode.sh + +echo "NETWORK: $NETWORK $POOL_NAME $TOPOLOGY" +echo "ENTRYPOINT_PROCESS: $ENTRYPOINT_PROCESS" [[ -z "${CNODE_HOME}" ]] && export CNODE_HOME=/opt/cardano/cnode [[ -z "${CNODE_PORT}" ]] && export CNODE_PORT=6000 @@ -61,4 +64,4 @@ else fi customise \ -&& exec "$CNODE_HOME"/scripts/cnode.sh \ No newline at end of file +&& exec "$CNODE_HOME/scripts/$ENTRYPOINT_PROCESS" "$@" \ No newline at end of file