|
1 | 1 | # Docker images |
2 | 2 |
|
3 | | -Docker images are available from [Docker Hub](https://hub.docker.com/r/statusim/nimbus-eth2) . |
| 3 | +Docker images for the [Nimbus beacon node](https://hub.docker.com/r/statusim/nimbus-eth2) and the [Nimbus validator client](https://hub.docker.com/r/statusim/nimbus-validator-client) are available at docker hub. |
4 | 4 |
|
5 | | -We have version-specific Docker tags (`statusim/nimbus-eth2:amd64-v1.2.3`) and a tag for the latest image (`statusim/nimbus-eth2:amd64-latest`). |
| 5 | +We have version-specific Docker tags (e.g. `statusim/nimbus-eth2:amd64-v1.2.3`) and a tag for the latest image (e.g. `statusim/nimbus-eth2:amd64-latest`). |
6 | 6 |
|
7 | | -These images are simply the contents of [release tarballs](./binaries.md) inside a `debian:bullseye-slim` image, running under a user imaginatively named `user`, with UID:GID of 1000:1000. |
| 7 | +These images contain the same binaries as the [release tarballs](./binaries.md) inside a `debian:bullseye-slim` image, running under a user imaginatively named `user`, with UID:GID of 1000:1000. |
8 | 8 |
|
9 | | -The unpacked archive is in `/home/user/nimbus-eth2` which is also the default *WORKDIR*. The default *ENTRYPOINT* is the binary itself: `/home/user/nimbus-eth2/build/nimbus_beacon_node` |
| 9 | +The binaries are placed under the `/home/user/` directory which is also the default *WORKDIR*. The *ENTRYPOINT* of the image is configured to directly launch the respective binary without any extra arguments. |
10 | 10 |
|
11 | 11 | ## Usage |
12 | 12 |
|
13 | 13 | Before running Nimbus via docker, you need to prepare a data directory and mount it in docker. |
14 | 14 |
|
15 | | -It is recommended that you mount the directory at `/home/user/nimbus-eth2/build/data` and pass `--data-dir=build/data/shared_mainnet_0` to all `nimbus_beacon_node` commands. |
16 | | - |
17 | | -The wrapper script outlined below will set the data directory automatically. |
| 15 | +It is recommended that you mount the directory at `/home/user/data` and pass `--data-dir=data/beacon_node/mainnet_0` to all `nimbus_beacon_node` commands. |
18 | 16 |
|
19 | 17 | ```sh |
20 | 18 | mkdir data |
21 | 19 | docker run -it --rm \ |
22 | | - -v ${PWD}/data:/home/user/nimbus-eth2/build/data \ |
| 20 | + -v ${PWD}/data:/home/user/data \ |
23 | 21 | statusim/nimbus-eth2:amd64-latest \ |
24 | | - --data-dir=build/data/shared_mainnet_0 |
25 | | - --network=mainnet [other options] |
| 22 | + --data-dir=data/beacon_node/mainnet_0 |
| 23 | + --network=mainnet \ |
| 24 | + [other options] |
26 | 25 | ``` |
27 | 26 |
|
28 | | -### Wrapper script |
29 | | - |
30 | | -If you wish, you can choose to use a wrapper script instead: |
| 27 | +Similarly, to launch a Nimbus validator client you can use the following command: |
31 | 28 |
|
32 | 29 | ```sh |
33 | 30 | mkdir data |
34 | 31 | docker run -it --rm \ |
35 | | - -v ${PWD}/data:/home/user/nimbus-eth2/build/data \ |
36 | | - --entrypoint /home/user/nimbus-eth2/run-mainnet-beacon-node.sh \ |
37 | | - statusim/nimbus-eth2:amd64-latest [other options] |
| 32 | + -v ${PWD}/data:/home/user/data \ |
| 33 | + statusim/nimbus-validator_client:amd64-latest \ |
| 34 | + --data-dir=data/validator_client/mainnet_0 \ |
| 35 | + [other options] |
38 | 36 | ``` |
39 | 37 |
|
| 38 | +!!! warning |
| 39 | + Do not use the same data directory for beacon node and validator client - they will both try to load the same keys which may result in slashing! |
| 40 | + |
40 | 41 | ### Docker compose |
41 | 42 |
|
42 | 43 | Our preferred setup is using `docker-compose`. You can use one of our [example configuration files](https://github.com/status-im/nimbus-eth2/tree/stable/docker/dist/binaries) as a base for your own custom configuration: |
|
0 commit comments