ubuntu16.10安装docker17.03.0-ce并配置国内源和加速器
Docker  /  管理员 发布于 7年前   178
说明:这个针对docker-ce安装,ce和ee的区别是前者是社区版,后者是企业版
1. 配置Ubuntu的源,不然慢的去哭吧。参考https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 注意版本要对应。我的源配置见附件http://xiazai..net.cn/201705/yuanma/sources_jb51.rar。
2. 安装docker,按照官方教程https://docs.docker.com/engine/installation/linux/ubuntu/
环境依赖
$ sudo apt-get update$ sudo apt-get install \linux-image-extra-$(uname -r) \linux-image-extra-virtual
安装docker包
$ sudo apt-get install \apt-transport-https \ca-certificates \curl \software-properties-common
添加docker官方GPG秘钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
安装稳定版仓库
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \stable"
再次更新源
sudo apt-get update
安装docker-ce
sudo apt-get install docker-ce
3. 给docker添加国内加速器(参考https://github.com/yeasy/docker_practice/blob/master/install/mirror.md)
在阿里云申请一个账号,打开连接https://cr.console.aliyun.com/#/accelerator 拷贝您的专属加速器地址,然后/etc/systemd/system/multi-user.target.wants/docker.service 文件,找到 ExecStart= 这一行,在这行最后添加加速器地址 --registry-mirror=<加速器地址>
如:ExecStart=/usr/bin/dockerd --registry-mirror=https://jxus37ad.mirror.aliyuncs.com
注:对于 1.12 以前的版本,dockerd 换成 docker daemon
重新加载配置并且重新启动
$ sudo systemctl daemon-reload$ sudo systemctl restart docker
至此docker安装及国内加速器都好了,开始你的docker之旅吧。
hello-word
$ sudo docker run hello-world
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号