首页 > 其他 > 详细

docker安装配置

时间:2019-04-17 11:08:41      阅读:120      评论:0      收藏:0      [点我收藏+]
##########################################
#docker安装配置
#环境centos7
 
#配置docker阿里源
echo #Docker
[docker-ce-stable]
name=Docker CE - Aliyun
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
>/etc/yum.repos.d/docker-ce.repo
yum makecache fast
 
#安装必要的系统工具
yum install -y device-mapper-persistent-data lvm2
 
#安装 docker-ce
yum install -y docker-ce
 
#启动docker
systemctl enable docker
systemctl start  docker
 
docker info
docker version
 
#默认镜像源慢,配置镜像加速
#申请阿里云加速地址https://dev.aliyun.com/
#docker阿里云加速配置
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-EOF
{
  "registry-mirrors": ["https://a0x0e4iy.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
 
 
##########################################
#测试运行 hello-world
docker run hello-world
 
##########################################

 

docker安装配置

原文:https://www.cnblogs.com/kcxg/p/10721808.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!