docker下载地址:https://download.docker.com/linux/static/stable/x86_64/
下载命令:
查看centos7内核版本:uname -r
离线安装包:wget https://download.docker.com/linux/static/stable/x86_64/docker-18.09.9.tgz
解压安装包:tar -zxvf docker-18.09.9.tgz
复制到/usr/bin目录:cp docker/* /usr/bin/
创建/etc/systemd/system/docker.service文件,并写入如下内容,注意要修改
--insecure-registry=127.0.0.1,替换为虚拟机的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 cur