Docker学习系列(二):Ubuntu下安装Docker
2016-05-15 15:12
661 查看
Docker的详细教程见Docker官网及Install Docker on ubuntu
安装使用时,需要注意一点:要用sudo权限!
注1:apt-get是ubuntu安装软件的管理工具
注2:这里的“安装docker”其实就是安装Docker Engine)
Why do Ubuntu use docker.io as executable name instead of just docker? Tutorials, blog posts all now have to mention this difference, “if you use Ubuntu 14.04, or if you are with rest of the world (including earlier versions of Ubuntu)”. Why?
This is because of a Debian/Ubuntu policy; there is already a program called “docker” [1], and it was not allowed to use the same binary name.
http://blog.docker.com/2014/04/docker-in-ubuntu-ubuntu-in-docker/
① 检查ubutnu是否安装了curl工具
如果发现curl工具没有安装,那么,需要安装curl工具
② 获取最新的docker package
注:第二次使用docker时遇到了一个问题,检测daocker是否安装成功,返回的结果时已经成功,但却出现了如下的错误提示:
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
网上的解决方案特别多,试了其中一种,解决了该问题:并未启动docker的服务,使用下面的方法重新启动docek
Docker image的默认安装路径是: /var/lib/docker
安装使用时,需要注意一点:要用sudo权限!
1.Ubuntu14.04下Docker的安装
本人在ubutnu14.04下进行了两次docker安装,两次使用了不同的安装方法方法一:一句命令安装
sudo apt-get intasll docker.io注1:apt-get是ubuntu安装软件的管理工具
注2:这里的“安装docker”其实就是安装Docker Engine)
Why do Ubuntu use docker.io as executable name instead of just docker? Tutorials, blog posts all now have to mention this difference, “if you use Ubuntu 14.04, or if you are with rest of the world (including earlier versions of Ubuntu)”. Why?
This is because of a Debian/Ubuntu policy; there is already a program called “docker” [1], and it was not allowed to use the same binary name.
http://blog.docker.com/2014/04/docker-in-ubuntu-ubuntu-in-docker/
方法二:利用docker官网的linux-docker安装教程进行
具体步骤:① 检查ubutnu是否安装了curl工具
which curl
如果发现curl工具没有安装,那么,需要安装curl工具
sudo apt-get update sudo apt-get install curl
② 获取最新的docker package
curl -fsSL https://get.docker.com/ | sh
2.确认docker engine是否安装成功
利用如下命令:# Check that you have a working install sudo docker info
注:第二次使用docker时遇到了一个问题,检测daocker是否安装成功,返回的结果时已经成功,但却出现了如下的错误提示:
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
网上的解决方案特别多,试了其中一种,解决了该问题:并未启动docker的服务,使用下面的方法重新启动docek
sudo service docker stop sudo service docker start
Docker image的默认安装路径是: /var/lib/docker
相关文章推荐
- docker命令总结
- docker 概述
- CentOS7上安装和使用Docker
- Docker中一些常用的命令
- Docker的一些概念(1)
- Docker的四个基本概念
- 教你怎么半天搞定Docker
- 【Docker 在 windows 10 / windows 8 下安装】
- Docker学习 ----常用操作命令大全及例子[陆续更新中...]
- docker动态映射运行的container端口
- Docker容器的跨主机连接
- (OK) Fedora23—NS3—Docker—MANETs—Testing
- (OK) Docker中使用固定IP——docker run -i -t --rm --net='none'
- docker常用命令记录
- docker学习-简单安装及使用
- Docker 容器十诫
- Docker 容器十诫
- docker入门实战笔记
- Dockerfile 详解
- Docker: oracle_xe_10g 数据库 运行sqlplus 时Message file sp1<lang>.msb not found 错误解决办法_20160513_七侠镇莫尛貝