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相 ...
随机推荐
- R包安装失败failed to download mirrors file
在R console中使用install.packages()来安装第三方包时,会出现这样的错误: 即使我们选择的是China的镜像也解决不了问题. 这时候,可以先试试用IE打开上图中黑底部分的URL ...
- fsync性能问题
最近在测试种发现程序里调用fsync刷文件到磁盘时,开销只有几百微秒,于是对fsync相关机制进行了一番调查. 磁盘(或RAID卡)自身通常会有硬件缓存机制,对于写操作,有write back和wri ...
- 使用Jenkins集成和自动化打包资料
1.手把手教你利用Jenkins持续集成iOS项目 http://www.jianshu.com/p/41ecb06ae95f 2.Jenkins+ Xcode+ 蒲公英 实现IOS自动化打包和分发 ...
- 《Android Studio实用指南》4.27 使用演示模式
本文节选自<Android Studio实用指南> 第4章第27节 作者: 毕小朋 目前本书已上传到百度阅读, 在百度中搜索[Anroid Studio实用指南]便可以找到本书. 什么是演 ...
- Thinking in 查询设计
近日,互联网动物园的各位小伙伴们召开了一次会议,考虑到大火的电子商务,准备在动物园里开发一个电商系统.首先上台的是销售山鸡,清了清嗓子,说道,人类正在进行电商革命,动物园也需要上一个电商系统,必要性有 ...
- java工具jar包—Lombok
如何引入 maven工程,直接引入lombok的jar依赖即可: <dependency> <groupId>org.projectlombok</groupId> ...
- SQL2000中创建作业(定时查询,更新)(转)
出处:http://blog.csdn.net/xys_777/article/details/5683413 SQL2000中创建作业(定时查询,更新)企业管理器 --管理 --SQL Server ...
- Fiddldr 教程之:HTTP协议详解(转)
原文地址:http://www.cnblogs.com/TankXiao/archive/2012/02/13/2342672.html HTTP协议详解 当今web程序的开发技术真是百家争鸣,ASP ...
- HDU 4352 XHXJ's LIS (数位DP+LIS+状态压缩)
题意:给定一个区间,让你求在这个区间里的满足LIS为 k 的数的数量. 析:数位DP,dp[i][j][k] 由于 k 最多是10,所以考虑是用状态压缩,表示 前 i 位,长度为 j,状态为 k的数量 ...
- Word文档如何发CSDN博客
目前大部分的博客作者在写博客这件事情上都会遇到以下3个痛点:1.所有博客平台关闭了文档发布接口,用户无法使用Word,Windows Live Writer等工具来发布博客.2.发布到博客或公众号平台 ...