ubuntu和centos安装docker
一. UBUNTU系统上
1. 卸载旧版本(新系统不用执行)
2. 安装docker
#step 1: 安装必要的一些系统工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
#step 2: 安装GPG证书
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
#Step 3: 写入软件源信息
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
#sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
#Step 4: 更新并安装Docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce
二. CENTOS安装docker
1. centos6安装docker1.71很简单, 如下,但是不支持docker-compose,因为docker版本太低
2. 在centos6上跑docker和docker-compose
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org #导入public key
rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm #安装ELRepo到centos
yum --enablerepo=elrepo-kernel install kernel-ml -y #安装kernel,后缀ml是最新版,lt事稳定版
vim /etc/grub.conf 修改第一行为default=0 #修改grub引导顺序,一般新安装的内核在第一个位置,设置default=0,表示启动新内核
最后重启系统即可
yum install epel-release -y
yum install docker-io -y #安装docker1.7.1
curl -sSL -O https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 #下载1.9.1,我是用香港aliyun服务器下载的,国内的好像不行
# wget -c https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 下载docker-1.10版的地址,但是在6上貌似不可用
chmod +x docker-1.9.
mv docker-1.9. /usr/bin/docker #替换
service docker restart
docker version #查看版本
3. centos7上安装docker
Uninstall old versions
Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them, along with associated dependencies.
Install Docker CE
Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.
Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well.
Install the latest version of Docker CE
Start Docker.
Verify that docker is installed correctly by running the hello-world image.
Uninstall Docker CE
Uninstall the Docker package
Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes
4. 卸载docker
三. 安装docker-compose
四. 使用加速器
centos6上装docker参考:
http://blog.csdn.net/jeffleo/article/details/70904150
http://www.senra.me/centos6-install-new-docker-191-or-113/ #编译方法升级到1.13版,经测试不靠谱
ubuntu和centos安装docker的更多相关文章
- 【实战】Docker 入门实战一:ubuntu 和 centos 安装Docker
Docker是什么 Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从Apache2.0协议开源.Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布 ...
- ubuntu 和 CentOS 安装docker
一.ubuntu14.04 安装docker 1 apt-get update2 apt-get update-grup3 reboot4 检查mapper的安装:ls -l /sys/class/m ...
- Ubuntu 上如何安装Docker
Docker 是一个开源项目,为开发者和系统管理员提供了一个开放的平台,在任何地方通过打包和运行应用程序作为一个轻量级的容器.Docker 在软件容器内自动部署应用程序.Docker 最开始由 Sol ...
- CentOS安装docker,及其基本操作
CentOS安装docker,及其基本操作 一.安装docker Docker要求运行在Centos 7上,要求系统为64位,系统内核版本3.10以上 1.uname -an 查看当前系统版本 2.y ...
- Ubuntu 20.04安装Docker
Docker学习系列文章 入门必备:十本你不容错过的Docker入门到精通书籍推荐 day1.全面的Docker快速入门教程 day2.CentOS 8.4安装Docker day3.Windows1 ...
- Redhat/Ubuntu/Windows下安装Docker
Redhat/Ubuntu/Windows下安装Docker 什么是Docker Docker是Docker.inc公司开源的一个基于LXC技术之上构建的Container容器引擎,基于Go语言并遵从 ...
- ubuntu 12.04 安装Docker 实战
2016-3-8 从网络服务商那里申请到一台Ubuntu测试服务器,用来测试安装Docker环境. 注:本人初学Docker,对Linux命令也仅是稍稍了解,如有错误,烦请告知. 查看系统相关信息 可 ...
- centos安装docker容器
centos安装docker容器 系统环境需求 docker要运行在centos7系统中,系统为64位机器上,内核最小版本在3.10以上 如果系统为centos6,后面有附带的安装方法 uname - ...
- [笔记] Ubuntu 18.04安装Docker CE及nvidia-docker2流程
Docker的好处之一,就是在Container里面可以随意瞎搞,不用担心弄崩Host的环境. 而nvidia-docker2的好处是NVidia帮你配好了Host和Container之间的CUDA相 ...
随机推荐
- mysql默认字符编码设置教程:my.ini设置字符编码
在mysql的安装目录下找到my.ini,如果没有就把my-medium.ini复制为一个my.ini即可. 打开my.ini以后, [client] default-character-set=ut ...
- Unity几个有用的游戏运动特效
本文摘要 本文主要记录了我在开发格斗游戏时用到的几个运动特效,可以方便地表现武器挥动.运动模糊和其他一些特效.灵活使用可以大幅提升格斗游戏的视觉效果和感染力.有关Unity的其他话题也可以查阅我的其他 ...
- [模板]RMQ(冲刺准备中)
洛谷P3865 注意:位运算一定要加括号!因为他的优先级没有加减法高: 注意在预处理的时候判断的是前一个区间是否完整,故 i+(1<<(j-1))-1<=n; 取logn时最好多加一 ...
- csv乱码
可能:iconv转码导致,本身已经是GBK,又进行了GBK转码
- Spirng.net 替换任意方法
1.首先上客户端代码 static void Main(string[] args) { IApplicationContext ctx = ContextRegi ...
- 解决URL参数中文乱码
string key = HttpUtility.UrlDecode(Request["key"], Encoding.UTF8);
- 关于设置了setMaxAge(0)而浏览器未成功删除Cookie的注意事项
最近做了个系统,其中涉及到对Cookie的操作.当用户登录时,设置一些数据到Cookie中,用户登出系统的时候删除写入浏览器中的对应Cookie.问题就出在登出系统时,在firebug中看到需要删除的 ...
- win10安装MySQL免安装版
一:下载并解压 这个就不多说了https://dev.mysql.com/downloads/mysql/,简单的很 二:MySQL根目录下新建my.ini [mysql] # 设置mysql客户端默 ...
- Alpha冲刺(八)
Information: 队名:彳艮彳亍团队 组长博客:戳我进入 作业博客:班级博客本次作业的链接 Details: 组员1(组长)柯奇豪 过去两天完成了哪些任务 进一步优化代码,结合自己负责的部分修 ...
- 洛谷P2147[SDOI2008]洞穴勘测(lct)
题目描述 辉辉热衷于洞穴勘测. 某天,他按照地图来到了一片被标记为JSZX的洞穴群地区.经过初步勘测,辉辉发现这片区域由n个洞穴(分别编号为1到n)以及若干通道组成,并且每条通道连接了恰好两个洞穴.假 ...