openEuler最速安装docker(包含利用国内镜像完成镜像加快)
系统环境:openEuler release 22.03
1、添加docker堆栈
下令行输入如下下令
- vim /etc/yum.repos.d/docker-ce.repo
复制代码 进入文件后,按i进入编辑模式,粘贴如下内容
- [docker-ce-stable]
- 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
-
- [docker-ce-stable-debuginfo]
- 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
-
- [docker-ce-stable-source]
- 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
-
- [docker-ce-test]
- 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
-
- [docker-ce-test-debuginfo]
- 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
-
- [docker-ce-test-source]
- 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
-
- [docker-ce-nightly]
- 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
-
- [docker-ce-nightly-debuginfo]
- 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
-
- [docker-ce-nightly-source]
- 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
复制代码
3、启动docker服务
下令行输入如下代码
- sudo systemctl enable --now docker
复制代码
查看服务状态
镜像加快
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、重启服务
3、查看docker信息
至此完成,若有其他环境或疑问,欢迎留言
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |