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相 ...
随机推荐
- Spark internal - 多样化的运行模式(上)
Spark的运行模式多种多样,在单机上既可以以本地模式运行,也可以以伪分布式模式运行.而当以分布式的方式运行在Cluster集群中时,底层的资源调度可以使用Mesos 或者是Hadoop Yarn , ...
- 基于mapper插件编写的可定制代码生成基本框架(springboot)
先看一下,基本结构图: 特征,提供 最佳实践的项目结构.配置文件.精简的POM 统一响应结果封装 统一异常处理 统一接口登录认证 常用基础方法抽象封装 Controller.service.dao层基 ...
- ubuntu14.04 64 位 vmware tools 问题
当提示说open-vm-tools版本太低时可以这样解决 1.sudo apt-get autoremove open-vm-dkms open-vm-tools --purge 2.安装vmware ...
- [C++] Swap Two Num
Swap Two Num
- 运行jupyter
在mac 命令行中输入 jupyter notebook 即可 https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebo ...
- python 全栈基础作业题
1.执行 Python 脚本的两种方式 1..直接使用PyCharm执行 2.python run.py 调用python 解释器来调用python脚本 2.简述位.字节的关系 数据存储是以“字节”( ...
- Asp.net相关知识和经验的碎片化记录
1.解决IIS7.0下“HTTP 错误 404.15 - Not Found 请求筛选模块被配置为拒绝包含的查询字符串过长的请求”问题 方案1:在程序的web.config中system.web节点里 ...
- MYSQL隐式类型转换
MYSQL隐式类型转换 关于官方文档中的理解大致是: 如果两个参数比较,有至少一个NULL,结果就是NULL,除了是用NULL<=>NULL 会返回1.不做类型转换 两个参数都是字符串,按 ...
- 如何快速增加pdf书签,解除pdf限制
一.需要的工具 福昕PDF阅读器 Foxit PDF Editor 2.2.1 build 1119 汉化版 下载地址:http://www.onlinedown.net/soft/51002.htm ...
- canvas学习日记一
由于工作的需求,促进我学习html5 canvas技术,canvas是html5最强大的元素之一.使用它可以在浏览器中做一番奇妙的事情.大家或多或少都听过canvas的强大用处,我这里就不再赘述了. ...