docker安装配置

###########################################docker安装配置#环境centos7 #配置docker阿里源echo '#Docker[docker-ce-stable]name=Docker CE - Aliyunbaseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/enabled=1gpgcheck=1gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg'>/etc/yum.repos.d/docker-ce.repoyum makecache fast #安装必要的系统工具yum install -y device-mapper-persistent-data lvm2 #安装 docker-ceyum install -y docker-ce #启动dockersystemctl enable dockersystemctl start docker docker infodocker version #默认镜像源慢,配置镜像加速#申请阿里云加速地址https://dev.aliyun.com/#docker阿里云加速配置mkdir -p /etc/dockertee /etc/docker/daemon.json <<-'EOF'{ "registry-mirrors": ["https://a0x0e4iy.mirror.aliyuncs.com"]}EOFsystemctl daemon-reloadsystemctl restart docker ###########################################测试运行 hello-worlddocker run hello-world ##########################################

赞 (0)