阿里云ECS安装Docker
2017-02-13 17:57
387 查看
阿里云ESC系统信息,官方说2.6内核运行docker服务可能会不稳定;
安装过程参考: http://www.docker.org.cn/book/install/install-docker-on-rhel-29.html
1. 本机未安装curl,需要先安装curl:
2. 执行docker安装脚本:
3. 启动docker服务,启动过程中遇到了一些问题,本文后面统一说明;
4. 查看docker版本:
5. 验证安装,显示以下信息表示成功;
$ uname -a Linux iZ259dixwg8Z 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
安装过程参考: http://www.docker.org.cn/book/install/install-docker-on-rhel-29.html
1. 本机未安装curl,需要先安装curl:
$ yum install curl
2. 执行docker安装脚本:
$ curl -sSL https://get.docker.com/ | sh
3. 启动docker服务,启动过程中遇到了一些问题,本文后面统一说明;
$ service docker start
4. 查看docker版本:
$ docker version Client version: 1.7.1 Client API version: 1.19 Go version (client): go1.4.2 Git commit (client): 786b29d OS/Arch (client): linux/amd64 Server version: 1.7.1 Server API version: 1.19 Go version (server): go1.4.2 Git commit (server): 786b29d OS/Arch (server): linux/amd64
5. 验证安装,显示以下信息表示成功;
$ docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/[/code]
service docker start启动过程中遇到的问题:
查看日志:docker -h
或者:cat /var/log/docker
问题1:symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
解决方法:$ yum upgrade device-mapper-libs
问题2:Error starting daemon: Error initializing network controller: Error cr eating default "bridge" network: can't find an address range for interface "docker0"
解决方法:route del -net 172.16.0.0/12
如果想每次服务器启动都生效的话,可以修改下路由文件,去掉下面的172.16.0.0/12 via 10.170.247.247 dev eth0 这一行
/etc/sysconfig/network-scripts/route-eth010.0.0.0/8 via 10.170.247.247 dev eth0 100.64.0.0/10 via 10.170.247.247 dev eth0 172.16.0.0/12 via 10.170.247.247 dev eth0 192.168.0.0/16 via 10.170.247.247 dev eth0
该问题具体原因查看:http://hanjianwei.com/2014/07/30/docker-on-aliyun/
问题3:在docker run hello-world的时候,设备突然重启了,重启后执行此命令显示$ docker run hello-world Error response from daemon: EOF
解决方法:$ docker pull hello-world
相关文章推荐
- ECS上安装docker运行阿里云日志服务demo
- 阿里云ECS--CentOS7.0操作系统安装 Docker
- 阿里云ECS(Centos7.2 64bit)安装Docker
- [Docker 入门--安装篇]阿里云ECS服务器Centos系统上安装docker
- 阿里云上ECS中安装docker
- 阿里云ECS服务器Ubuntu下安装docker-ce技巧
- 阿里云ecs安装docker
- 阿里云ECS(Ubuntu)安装Docker
- 在阿里云ECS上安装docker 1.7.1
- 阿里云ubuntu14.04的ECS主机安装Mysql步骤
- 阿里云上Centos6.6 x64安装docker1.4
- 阿里云ECS服务器配置ubuntu安装openfire服务器
- Linux一键安装web环境全攻略(阿里云ECS服务器)
- 阿里云 安装docker
- 阿里云-ECS-IPTABLE防火墙-安装
- 阿里云ECS服务器配置ubuntu安装openfire服务器
- 在阿里云的vps上安装docker
- 阿里云服务器 ECS Ubuntu系统下PHP,MYSQL,APACHE2的安装配置
- 阿里云 ubuntu 14.04 模板上安装 docker