银河麒麟安装docker
时间: 2023-11-20 15:56:05 浏览: 268
docker的安装
以下是在银河麒麟中安装docker的步骤:
1.卸载旧版本docker(如果有的话)
```shell
sudo apt-get remove docker docker-engine docker.io containerd runc
```
2.更新apt包索引并安装依赖包
```shell
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
```
3.添加Docker官方的GPG密钥
```shell
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```
4.设置Docker稳定版仓库
```shell
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```
5.更新apt包索引并安装Docker
```shell
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
```
6.验证Docker是否正确安装并运行
```shell
sudo docker run hello-world
```
阅读全文