linux终端安装docker
时间: 2023-08-07 20:08:03 浏览: 98
Linux安装docker
要在Linux终端上安装Docker,可以按照以下步骤进行操作:
1. 首先,使用以下命令卸载旧版本的Docker:
```
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine \
docker-ce
```
\[3\]
2. 然后,安装必要的软件包和依赖项:
```
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
```
3. 添加Docker的软件源:
```
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
```
4. 更新软件包缓存:
```
sudo yum makecache fast
```
5. 最后,安装Docker:
```
sudo yum -y install docker-ce
```
\[1\]
安装完成后,你可以使用以下命令来验证Docker是否成功安装:
```
docker --version
```
\[2\]
希望这可以帮助你成功在Linux终端上安装Docker。
#### 引用[.reference_title]
- *1* [bash脚本-centos7安装docker](https://blog.csdn.net/wang785994599/article/details/100018335)[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^v91^control_2,239^v4^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [安装docker](https://blog.csdn.net/lucylily11/article/details/127598805)[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^v91^control_2,239^v4^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文