安装部署:
本人使用的为openeuler版本,无法使用二进制进行安装(使用二进制安装时,无法使用docker中的补全命令,需要重新进行配置)在此使用yum直接进行安装。
[root@localhost ~]# yum install docker
镜像加速:
1.docker cn加速
[root@localhost ~]# mkdir -p /etc/docker
[root@localhost ~]# tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
EOF
2.阿里云加速器
(1)注册并登录阿里云账号
(2)在服务台选择容器镜像服务,点击镜像工具,选择镜像加速器,选择与linux环境相匹配的操作文档进行配置(获得专用加速器地址)
[root@localhost ~]# mkdir -p /etc/docker
[root@localhost ~]# tee /etc/docker/daemon.json << EOF
> {
> "registry-mirrors":["https://lpk5rspy.mirror.aliyuncs.com"]
> }
> EOF
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl restart docker
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.s>Active: active (running) since Mon 2024-03-11 20>Docs: https://docs.docker.com
(3)查看docker版本
[root@localhost ~]# docker version
Client:Version: 18.09.0EulerVersion: 18.09.0.332API version: 1.39Go version: go1.17.3Git commit: 9942888Built: Wed Dec 27 10:05:53 2023OS/Arch: linux/amd64Experimental: falseServer:Engine:Version: 18.09.0EulerVersion: 18.09.0.332API version: 1.39 (minimum version 1.12)Go version: go1.17.3Git commit: 9942888Built: Wed Dec 27 10:05:15 2023OS/Arch: linux/amd64Experimental: false