docker 源码安装
时间: 2023-08-26 12:18:29 浏览: 107
Docker源码用于安装
您可以按照以下步骤进行Docker源码安装:
1. 首先,下载Docker的安装包。可以使用以下命令下载Docker的稳定版本:
```
wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.17.tgz
```
2. 解压安装包并将可执行文件复制到/usr/bin目录下:
```
tar -xf docker-20.10.17.tgz
cp docker/* /usr/bin
```
3. 创建Docker的配置文件目录:
```
mkdir /etc/docker
```
4. 配置国内的镜像源以加速镜像拉取。可以使用以下命令创建并编辑配置文件:
```
cat > /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"]
}
EOF
```
5. 重新加载systemd的配置,使配置生效:
```
systemctl daemon-reload
```
6. 启动Docker服务:
```
systemctl start docker
```
7. 设置Docker开机自启动:
```
systemctl enable docker.service
```
8. 验证Docker的安装和版本:
```
docker -v
```
以上是使用源码安装Docker的步骤,希望对您有帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [docker源码安装,附一键部署脚本](https://blog.csdn.net/weixin_40946381/article/details/125991664)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [docker离线安装](https://blog.csdn.net/u014459738/article/details/110634599)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文