- Docker run Reference: https://docs.docker.com/engine/reference/run/
It's important to note here that without the -v
argument, your generated key would be stuck inside the container and deleted when the container exits! This example mounts the current directory pwd
inside the container at the /keys
path.
docker run --entrypoint /bin/bash -it -v $(pwd)/:/keys codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "CODA_PRIVKEY_PASS='password' coda client-old generate-keypair -privkey-path /keys/my_key"
This will run a full node without any extra features.
docker run -d --entrypoint /bin/bash codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "coda daemon \
-log-level Info -config-directory /root/.coda-config \
-client-port 8301 -rest-port 3085 \
-external-port 8302 -discovery-port 8303 \
-metrics-port 10000 \
-peer /dns4/seed-one.genesis.o1test.net/tcp/10002/ipfs/12D3KooWP7fTKbyiUcYJGajQDpCFo2rDexgTHFJTxCH8jvcL1eAH \
-peer /dns4/seed-two.genesis.o1test.net/tcp/10002/ipfs/12D3KooWL9ywbiXNfMBqnUKHSB1Q1BaHFNUzppu6JLMVn9TTPFSA"
This will run a block producer with a key you specify.
export MY_KEY_DIRECTORY=/absolute/path/to/keys
docker run -d -v $(MY_KEY_DIRECTORY)/:/keys --entrypoint /bin/bash codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "coda daemon \
-privkey-path /keys/my_key
-log-level Info -config-directory /root/.coda-config \
-client-port 8301 -rest-port 3085 \
-external-port 8302 -discovery-port 8303 \
-metrics-port 10000 \
-peer /dns4/seed-one.genesis.o1test.net/tcp/10002/ipfs/12D3KooWP7fTKbyiUcYJGajQDpCFo2rDexgTHFJTxCH8jvcL1eAH \
-peer /dns4/seed-two.genesis.o1test.net/tcp/10002/ipfs/12D3KooWL9ywbiXNfMBqnUKHSB1Q1BaHFNUzppu6JLMVn9TTPFSA"
This will run a SNARK worker. As there are no external components (like a private key) that need to be provided, no volumes!
docker run -d --entrypoint /bin/bash codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "coda daemon \
-snark-key <PUBLIC_KEY>
-snark-fee 20
-log-level Info -config-directory /root/.coda-config \
-client-port 8301 -rest-port 3085 \
-external-port 8302 -discovery-port 8303 \
-metrics-port 10000 \
-peer /dns4/seed-one.genesis.o1test.net/tcp/10002/ipfs/12D3KooWP7fTKbyiUcYJGajQDpCFo2rDexgTHFJTxCH8jvcL1eAH \
-peer /dns4/seed-two.genesis.o1test.net/tcp/10002/ipfs/12D3KooWL9ywbiXNfMBqnUKHSB1Q1BaHFNUzppu6JLMVn9TTPFSA"