Skip to content

Commit 32a61c4

Browse files
committed
doc: add a node oci merge mode example
1 parent 7a184fd commit 32a61c4

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

nix/docker/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Building the Cardano Node and Cardano Submit API Docker Images
1+
# Building Node and Submit API Images
22
To build and load the oci images into the Docker engine, the most
33
basic commands are:
44
```
@@ -12,7 +12,7 @@ docker load -i result
1212
```
1313

1414
From a bash shell, the following command example for the cardano-node image
15-
offers a little more convenience by tagging the loaded image with "dev" and
15+
offers a little more convenience by tagging the loaded image with `dev` and
1616
also tagging with a git tag if one is present at the build git commit hash.
1717
```
1818
nix build .#dockerImage/node \
@@ -106,13 +106,25 @@ merge config.
106106
Optional env variables and cardano-node args which can be used in custom mode
107107
can also be used in this mode.
108108

109+
An example:
110+
```
111+
docker run \
112+
-v $PWD/node-ipc:/ipc \
113+
-v $(pwd)/mainnet-data:/data \
114+
-e NETWORK=mainnet \
115+
-e CARDANO_CONFIG_JSON_MERGE='{"MaxConcurrencyBulkSync": 2}' \
116+
-e CARDANO_TOPOLOGY_JSON_MERGE='{"useLedgerAfterSlot": 147000000}' \
117+
ghcr.io/intersectmbo/cardano-node:dev
118+
```
109119

110120
## CLI Mode
111121
To run cardano-cli, leave the `NETWORK` env variable unset and provide
112122
entrypoint args starting with `cli` followed by cardano-cli command args.
113123
The cardano-node ipc socket state will need to be provided in cli mode.
114124

115-
An example using a docker named volume to share cardano-node ipc socket state:
125+
An example using a docker named volume to share cardano-node ipc socket state
126+
follows. In this example, another container running cardano-node and also
127+
sharing ipc socket state to the same named volume would already be running.
116128
```
117129
docker run \
118130
-v node-ipc:/ipc \
@@ -122,6 +134,10 @@ docker run \
122134
--mainnet
123135
```
124136

137+
See the [Cardano-node socket sharing](#cardano-node-socket-sharing) section for
138+
more on sharing ipc state between containers.
139+
140+
125141
## Bind Mounting Considerations
126142
For "custom" mode, the `/opt/cardano/{data,ipc,logs}` default state directories have been
127143
symlinked to the "scripts" mode default state directories of `/{data,ipc,logs}`
@@ -150,6 +166,7 @@ docker run \
150166
-e NETWORK=mainnet \
151167
ghcr.io/intersectmbo/cardano-submit-api:dev
152168
```
169+
153170
In "scripts" mode, the `node.socket` file is expected at `/ipc`.
154171

155172

0 commit comments

Comments
 (0)