一、下载二进制docker包、解压、拷贝文件
# wget https://download.docker.com/linux/static/stable/x86_64/docker-18.09.6.tgz
# tar xf docker-18.09.6.tgz
# cp docker/* /usr/bin/
# docker version
Client: Docker Engine - Community
Version: 18.09.6
API version: 1.39
Go version: go1.10.8
Git commit: 481bc77
Built: Sat May 4 02:33:34 2019
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
二、配置docker.service文件
# vi /usr/lib/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 ExecStart=/usr/bin/dockerd ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=infinity LimitNPROC=infinity TimeoutStartSec=0 Delegate=yes KillMode=process Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target |
# systemctl daemon-reload
# systemctl start docker
# ps -ef|grep docker
root 2466 1 0 16:47 ? 00:00:00 /usr/bin/dockerd
root 2470 2466 0 16:47 ? 00:00:00 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
root 2589 2424 0 16:49 pts/1 00:00:00 docker pull centos
root 2637 2620 0 16:50 pts/0 00:00:00 grep --color=auto docker
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。