同步操作将从 Gitee 极速下载/Dragonfly 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
In this quick start guide, you will get a feeling of Dragonfly by starting a SuperNode (the server) in your Docker container, installing the Dragonfly client (the client), and then downloading a container image and a general file, which are likely what you'll be doing frequently in your use case.
You have started your Docker container.
Pull the docker image we provided.
# Replace ${imageName} with the real image name
docker pull ${imageName}
Note: Choose one of the images we provide according to your geo-location, and replace ${imageName}
with it:
registry.cn-hangzhou.aliyuncs.com/alidragonfly/supernode:0.2.0
registry.us-west-1.aliyuncs.com/alidragonfly/supernode:0.2.0
Start a SuperNode.
# Replace ${imageName} with the real image name
docker run -d -p 8001:8001 -p 8002:8002 ${imageName}
For example, if you're in China, run the following commands:
docker pull registry.cn-hangzhou.aliyuncs.com/alidragonfly/supernode:0.2.0
docker run -d -p 8001:8001 -p 8002:8002 registry.cn-hangzhou.aliyuncs.com/alidragonfly/supernode:0.2.0
You have two options of installing Dragonfly client: installing from source code, or installing by pulling the image.
Download a package of the client.
cd $HOME
# Replace ${package} with a package appropriate for your operating system and location
wget ${package}
Note: Choose one of the packages we provide according to your geo-location, and replace ${package}
with it:
If you're in China:
Linux 64-bit: http://dragonfly-os.oss-cn-beijing.aliyuncs.com/df-client_0.2.0_linux_amd64.tar.gz
MacOS 64-bit: http://dragonfly-os.oss-cn-beijing.aliyuncs.com/df-client_0.2.0_darwin_amd64.tar.gz
If you're not in China:
Linux 64-bit: https://github.com/dragonflyoss/Dragonfly/releases/download/v0.2.0/df-client_0.2.0_linux_amd64.tar.gz
MacOS 64-bit: https://github.com/dragonflyoss/Dragonfly/releases/download/v0.2.0/df-client_0.2.0_darwin_amd64.tar.gz
Unzip the package.
# Replace ${package} with a package appropriate for your operating system and location
tar -zxf ${package}
Add the directory of df-client
to your PATH
environment variable to make sure you can directly use dfget
and dfdaemon
command.
# Execute or add this line to ~/.bashrc
export PATH=$PATH:$HOME/df-client/
For example, if you're in China and using Linux, run the following commands:
cd $HOME
wget http://dragonfly-os.oss-cn-beijing.aliyuncs.com/df-client_0.2.0_linux_amd64.tar.gz
tar -zxf df-client_0.2.0_linux_amd64.tar.gz
# execute or add this line to ~/.bashrc
export PATH=$PATH:$HOME/df-client/
Pull the docker image we provided.
docker pull dragonflyoss/dfclient:v0.3.0_dev
Start dfdaemon.
docker run -d -p 65001:65001 dragonflyoss/dfclient:v0.3.0_dev --registry https://xxx.xx.x
Configure the Daemon Mirror.
a. Modify the configuration file /etc/docker/daemon.json
.
vi /etc/docker/daemon.json
Tip: For more information on /etc/docker/daemon.json
, see Docker documentation.
b. Add or update the configuration item registry-mirrors
in the configuration file.
"registry-mirrors": ["http://127.0.0.1:65001"]
c. Restart Docker daemon.
systemctl restart docker
Now that you have started your SuperNode, and installed Dragonfly client, you can start downloading images or general files, both of which are supported by Dragonfly, but with slightly different downloading methods.
Once you have installed the Dragonfly client, you can use the dfget
command to download a file.
dfget -u 'https://github.com/dragonflyoss/Dragonfly/blob/master/docs/images/logo.png' -o /tmp/logo.png
Tip: For more information on the dfget command, see dfget.
Start dfdaemon
with a specified registry, such as https://index.docker.io
.
nohup dfdaemon --registry https://index.docker.io > /dev/null 2>&1 &
Add the following line to the dockerd configuration file /etc/docker/daemon.json.
"registry-mirrors": ["http://127.0.0.1:65001"]
Restart dockerd.
systemctl restart docker
Download an image with Dragonfly.
docker pull nginx:latest
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。