openEuler最速安装docker(包含利用国内镜像完成镜像加快)
openEuler最速安装docker(包含利用国内镜像完成镜像加快)系统环境:openEuler release 22.03
https://i-blog.csdnimg.cn/direct/58abcb7ac885414bacf36842b8e004b4.png
1、添加docker堆栈
下令行输入如下下令
vim/etc/yum.repos.d/docker-ce.repo
进入文件后,按i进入编辑模式,粘贴如下内容
name=Docker CE Stable - $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Stable - Debuginfo $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/debug-$basearch/stable
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Stable - Sources
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/source/stable
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Test - $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Test - Debuginfo $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/debug-$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Test - Sources
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/source/test
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Nightly - $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Nightly - Debuginfo $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/debug-$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
name=Docker CE Nightly - Sources
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/8/source/nightly
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
保存并退出(按下esc后,输入 :wq 回车即可)
2、安装docker
下令行中输入如下语句
sudo dnf install -y docker-ce docker-ce-cli containerd.io
https://i-blog.csdnimg.cn/direct/198ce6a860ec473681ccfe5020dee705.png
https://i-blog.csdnimg.cn/direct/5c3aa893135b4564b618eb04a5dcb9fe.png
3、启动docker服务
下令行输入如下代码
sudo systemctl enable --now docker
https://i-blog.csdnimg.cn/direct/69e3d989d48b4af68bd021b42782aee3.png
查看服务状态
systemctl status docker
https://i-blog.csdnimg.cn/direct/0e3784ee1d8d4d79a064652bc744b323.png
镜像加快
1、配置国内的镜像源
vim /etc/docker/daemon.json
在其中写入如下下令
{
"registry-mirrors": ["http://hub-mirror.c.163.com","https://registry.docker-cn.com","https://docker.mirrors.ustc.edu.cn"]
}
2、重启服务
systemctl restart docker
3、查看docker信息
docker info
https://i-blog.csdnimg.cn/direct/67c57f72d8354395b1885489e33b5685.png
至此完成,若有其他环境或疑问,欢迎留言
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]