话不多说直接上教程
1,环境的准备
docker 版本18.06.1 (二进制安装包)
centos 7.6 系统 (不同系统也可以,可跨版本)
2,下载docker (参考官网下载链接 https://download.docker.com/linux/static/stable/)找到自己
一下是博主下载的
3,开始部署
tar -xvf docker-18.06-1ce.tgz -C /usr/local/bin --strip-components=1
4,设置systemctl 启动
cat <<EOF >/etc/systemd/system/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
EnvironmentFile=-/etc/sysconfig/docker
ExecStart=/usr/local/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
EOF
5,设置开机自启动。
systemctl enable docker
systemctl start docker
systemctl status docker
6,完结