您的位置:首页 > 房产 > 建筑 > 汤阴县seo快速排名有哪家好_源码免费下载_网站优化建设_百度搜索页面

汤阴县seo快速排名有哪家好_源码免费下载_网站优化建设_百度搜索页面

2025/3/18 13:56:14 来源:https://blog.csdn.net/2301_77950376/article/details/146092334  浏览:    关键词:汤阴县seo快速排名有哪家好_源码免费下载_网站优化建设_百度搜索页面
汤阴县seo快速排名有哪家好_源码免费下载_网站优化建设_百度搜索页面

 简单安装方式

 yum list |grep docker


在rocky虚拟机中配置docker

安装必要的一些系统工具

 yum install -y yum-utils
 yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

下载社区版的docker

yum install docker-ce

在openeuler安装docker-ce 

dnf -y install dnf-plugins-core
 dnf config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

添加软件源信息 

dnf config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

未识别到8的版本更改一下配置文件 

将$releasever改成8

按下Esc
:% s/$releasever/8

配置docker加速器 

 cd /etc/docker/
vim daemon.json
{"registry-mirrors": ["https://docker.m.daocloud.io","https://hub-mirror.c.163.com","https://mirror.baidubce.com","https://docker.nju.edu.cn"]
}

测试拉取一个镜像


二进制配置docker 

在另外一台openeuler虚拟主机中配置

准备docker-ce二进制包

https://download.docker.com/linux/static/stable/x86_64/docker-28.0.1.tgz

配置相关服务配置文件

有三个配置文件:docker.service 、docker.socket、 containerd.service。

docker.service配置文件:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

docker.socket配置文件: 

 vim /etc/systemd/system/docker.socket
[Unit]
Description=Docker Socket for the API
PartOf=docker.service
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target

 containerd.service配置文件:

vim /etc/systemd/system/ containerd.service

 


[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target
[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/bin/containerd
Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
LimitNOFILE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999
[Install]
WantedBy=multi-user.target

 创建用户组

chown -R root.root docker/*
复制二进制文件到/usr/bin/目录

 cp docker/* /usr/bin/

配置加速器 

vim /etc/docker/daemon.json
{"registry-mirrors": ["https://docker.m.daocloud.io","https://hub-mirror.c.163.com","https://mirror.baidubce.com","https://docker.nju.edu.cn"]
}

 启动

 

拉取镜像

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com