Centos7 离线安装 docker
1.下载 docker-19.03.5.tgz
2.上传到要安装的服务器
3.解压
tar -zxvf docker-19.03.5.tgz
4.将解压后的文件移动到 /usr/bin 下
mv docker/* /usr/bin/
5.新建启动文件
vi /etc/systemd/system/docker.service
按 i 插入以下内容 注意: --insecure-registry=10.230.118.4 此处改为你自己服务器 ip
[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 --selinux-enabled=false --insecure-registry=10.230.118.4
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.
评论0