Docker 安装部署

安装参考文档:https://docs.docker.com/engine/installation/linux/centos/

 

1、系统环境

[root@crazy-acong ~]# cat /etc/redhat-release 
CentOS release 6.6 (Final)
[root@crazy-acong ~]# uname -a
Linux crazy-acong 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@crazy-acong ~]# ifconfig eth0 | grep "inet addr" | awk -F : '{print $2}'| awk '{print $1}'
192.168.1.105

2、使用 EPEL 库安装 Docker

[root@crazy-acong ~]# yum install -y http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm

[root@crazy-acong ~]# yum install -y docker-io

3、启动docker 服务端

[root@crazy-acong ~]# /etc/init.d/docker start

4、从网易镜像源下载一个镜像到docker中

可以在网易的docker镜像站搜索对应的镜像 https://c.163.com/hub#/m/home/, 例如我需要搜索 centos

 

[root@crazy-acong ~]# docker pull hub.c.163.com/library/centos:6.8

 5、查看下载下来的 docker 镜像

[root@crazy-acong ~]# docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
hub.c.163.com/library/centos   centos6.8           80e46367f846        7 months ago        194.5 MB

 

posted on 2017-04-06 15:49  奋斗中的码农  阅读(349)  评论(0编辑  收藏  举报

导航