1
- # Building the Cardano Node and Cardano Submit API Docker Images
1
+ # Building Node and Submit API Images
2
2
To build and load the oci images into the Docker engine, the most
3
3
basic commands are:
4
4
```
@@ -12,7 +12,7 @@ docker load -i result
12
12
```
13
13
14
14
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
16
16
also tagging with a git tag if one is present at the build git commit hash.
17
17
```
18
18
nix build .#dockerImage/node \
@@ -106,13 +106,25 @@ merge config.
106
106
Optional env variables and cardano-node args which can be used in custom mode
107
107
can also be used in this mode.
108
108
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
+ ```
109
119
110
120
## CLI Mode
111
121
To run cardano-cli, leave the ` NETWORK ` env variable unset and provide
112
122
entrypoint args starting with ` cli ` followed by cardano-cli command args.
113
123
The cardano-node ipc socket state will need to be provided in cli mode.
114
124
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.
116
128
```
117
129
docker run \
118
130
-v node-ipc:/ipc \
@@ -122,6 +134,10 @@ docker run \
122
134
--mainnet
123
135
```
124
136
137
+ See the [ Cardano-node socket sharing] ( #cardano-node-socket-sharing ) section for
138
+ more on sharing ipc state between containers.
139
+
140
+
125
141
## Bind Mounting Considerations
126
142
For "custom" mode, the ` /opt/cardano/{data,ipc,logs} ` default state directories have been
127
143
symlinked to the "scripts" mode default state directories of ` /{data,ipc,logs} `
@@ -150,6 +166,7 @@ docker run \
150
166
-e NETWORK=mainnet \
151
167
ghcr.io/intersectmbo/cardano-submit-api:dev
152
168
```
169
+
153
170
In "scripts" mode, the ` node.socket ` file is expected at ` /ipc ` .
154
171
155
172
0 commit comments