Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 6f76e4a

Browse files
committed
add --node when starting dfclient container
Signed-off-by: yeya24 <[email protected]>
1 parent c9728c1 commit 6f76e4a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

docs/quick_start/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
# Dragonfly Quick Start
22

3-
Dragonfly Quick Start document aims to help you to quick start Dragonfly journey. This experiement is quite easy and simplified.
3+
Dragonfly Quick Start document aims to help you to quick start Dragonfly journey. This experiment is quite easy and simplified.
44

55
If you are using Dragonfly in your production environment to handle production image distribution, please refer to supernode and dfget's detailed production parameter configuration.
66

77
## Prerequisites
88

9-
All steps in this document are done on the same machine using the docker container, so make sure the docker container engine is installed and started on your machine. You can also refer to the documentation: [multi-machine deployment] (../userguide/multi_machines_deployment.md) to experience Dragonfly.
9+
All steps in this document are done on the same machine using the docker container, so make sure the docker container engine is installed and started on your machine. You can also refer to the documentation: [multi-machine deployment](../user_guide/multi_machines_deployment.md) to experience Dragonfly.
1010

1111
## Step 1: Deploy Dragonfly Server (SuperNode)
1212

1313
```bash
14-
docker run -d --name supernode --restart=always -p 8001:8001 -p 8002:8002 \
15-
dragonflyoss/supernode:0.4.0 -Dsupernode.advertiseIp=127.0.0.1
14+
docker run -d --name supernode --restart=always -p 8001:8001 -p 8002:8002 dragonflyoss/supernode:0.4.1
1615
```
1716

18-
> **NOTE**: `supernode.advertiseIp` should be the ip that clients can connect to, `127.0.0.1` here is an example for testing, and it can only be used if the server and client are in the same machine.
17+
**NOTE**:
18+
19+
- If dfclient cannot connect to supernode directly, you can specify parameter `--advertise-ip` when supernode starts. This ip address must be accessible from dfclient. If this parameter is not specified, supernode will advertise its first non-loop address.
1920

2021
## Step 2:Deploy Dragonfly Client (dfclient)
2122

2223
```bash
23-
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io
24+
SUPERNODE_IP=`docker inspect supernode -f '{{.NetworkSettings.Networks.bridge.IPAddress}}'`
25+
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.1 --registry https://index.docker.io --node $SUPERNODE_IP
2426
```
2527

26-
**NOTE**: The `--registry` parameter specifies the mirrored image registry address, and `https://index.docker.io` is the address of official image registry, you can also set it to the others.
28+
**NOTE**:
29+
30+
- The `--registry` parameter specifies the mirrored image registry address, and `https://index.docker.io` is the address of official image registry, you can also set it to the others.
31+
- The `--node` parameter specifies the supernode's ip address. Here we use `docker inspect` to get the ip of supernode container. Since the supernode container exposes its ports, you can specify this parameter to node ip address as well.
2732

2833
## Step 3. Configure Docker Daemon
2934

0 commit comments

Comments
 (0)