使用官方安装脚本自动安装
需使用 root 或sudu 权限账户安装
安装命令如下:
curl -fsSL https://test.docker.com -o install-docker.sh
sudo sh install-docker.sh
脚本中指令:
–version
安装指定版本
Use the --version option to install a specific version, for example:
$ sudo sh install-docker.sh --version 23.0
–channel <stable|test>
安装指定发行版(稳定版/测试版)
Use the --channel option to install from an alternative installation channel.
The following example installs the latest versions from the “test” channel,
which includes pre-releases (alpha, beta, rc):
$ sudo sh install-docker.sh --channel test
Alternatively, use the script at https://test.docker.com, which uses the test
channel as default.
–mirror <Aliyun|AzureChinaCloud>
使用指定国内源安装(应对无法连接 docker 的情况)
可选Aliyun/AzureChinaCloud
Use the --mirror option to install from a mirror supported by this script.
Available mirrors are “Aliyun” (https://mirrors.aliyun.com/docker-ce), and
“AzureChinaCloud” (https://mirror.azure.cn/docker-ce), for example:
$ sudo sh install-docker.sh --mirror AzureChinaCloud
文章评论