网站建设开发报价方案模板下载,动力无限网站效果好不好,wordpress 菜单按钮,好看个人网页模板背景
总结下docker的一些知识
docker安装#xff08;有网络版#xff09;
参考文章我以前试过这个帖子#xff0c;建议安装高版本的docker#xff0c;#xff08;20以上的#xff0c;不然可能会有一些问题#xff09;
## 1、安装依赖
[rootiZo7e61fz42ik0Z ~]#yum i…背景
总结下docker的一些知识
docker安装有网络版
参考文章我以前试过这个帖子建议安装高版本的docker20以上的不然可能会有一些问题
## 1、安装依赖
[rootiZo7e61fz42ik0Z ~]#yum install -y yum-utils device-mapper-persistent-data lvm2
## 2、添加docker软件源
[rootiZo7e61fz42ik0Z ~]#yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
## 3、只保留稳定版本
[rootiZo7e61fz42ik0Z ~]#yum-config-manager --disable docker-ce-edge
[rootiZo7e61fz42ik0Z ~]#yum-config-manager --disable docker-ce-test
## 4、更新包索引
[rootiZo7e61fz42ik0Z ~]#yum makecache fast
## 5、更新yum包索引
[rootiZo7e61fz42ik0Z ~]#yum list docker-ce --showduplicates|sort -r
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror
Installed Packages
docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable
docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
Available Packages
# 安装指定版本
[rootiZo7e61fz42ik0Z ~]#yum -y install docker-ce-18.06.1.ceDocker安装完毕启动Docker服务查看一下版本
# 启动docker
[rootiZo7e61fz42ik0Z ~]#systemctl start docker
# 开机自启
[rootiZo7e61fz42ik0Z ~]#systemctl enable docker
# 查看版本
[rootiZo7e61fz42ik0Z ~]# docker version
Client:Version: 18.06.1-ceAPI version: 1.38Go version: go1.10.3Git commit: e68fc7aBuilt: Tue Aug 21 17:23:03 2018OS/Arch: linux/amd64Experimental: falseServer:Engine:Version: 18.06.1-ceAPI version: 1.38 (minimum version 1.12)Go version: go1.10.3Git commit: e68fc7aBuilt: Tue Aug 21 17:25:29 2018OS/Arch: linux/amd64Experimental: falsedocker安装无网络版
提前下载docker下载docker的安装文件https://download.docker.com/linux/static/stable/x86_64/开始安装
docker 安装这里我下载的19.03.9后续就出现了一些端口安全的问题
# 解压docker 安装包
tar -zxvf docker-19.03.9.tgz
# 解压文件移动到到 /usr/bin
mv docker/* /usr/bin/
# 配置docker.service 文件
cd /etc/systemd/system/
# 把离线部署里的docker.service文件传到这个目录
可以使用sftp或者rz命令
# 赋予执行权限
chmod x /etc/systemd/system/docker.service
# 重新加载配置文件
systemctl daemon-reload
# 开机自启
systemctl enable docker.service
# 启动docker
systemctl start docker
#查看docker版本docker -v docker.service文件
[Unit]
DescriptionDocker Application Container Engine
Documentationhttps://docs.docker.com
Afternetwork-online.target firewalld.service
Wantsnetwork-online.target[Service]
Typenotify
# 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 -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
ExecReload/bin/kill -s HUP
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILEinfinity
LimitNPROCinfinity
LimitCOREinfinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMaxinfinity
TimeoutStartSec0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegateyes
# kill only the docker process, not all processes in the cgroup
KillModeprocess
# restart the docker process if it exits prematurely
Restarton-failure
StartLimitBurst3
StartLimitInterval60s[Install]
WantedBymulti-user.target