资讯专栏INFORMATION COLUMN

CentOS上面搭建Docker

Dr_Noooo / 1721人阅读

摘要:在上面搭建一个不要为我为什么不用因为某种我不想说的原因。环境要求要求系统必须在以上,内核版本必须是以上查看版本查看内核版本安装运行命令第一条命令是更新下现有库。启动测试下安装是否成功使用著名的安装成功

在CentOS上面搭建一个Docker,不要为我为什么不用Ubuntu(因为某种我不想说的原因^_^)。

环境要求

Docker要求系统必须在CentOS 6以上,内核版本必须是2.6.32-431以上
查看CentOS版本:

cat /etc/issue

CentOS release 6.7 (Final)
Kernel 
 on an m

查看内核版本:

uname -r

2.6.32-573.el6.x86_64
安装Docker

运行命令:

yum update
sudo yum install docker-io

第一条命令是更新下现有库。

启动Docker

sudo service docker start

tarting cgconfig service:                                 [  OK  ]
Starting docker:                                       [  OK  ]

测试下Docker安装是否成功,使用著名的hello world:

docker run hello-world

latest: Pulling from hello-world
3f12c794407e: Pull complete
975b84d108f1: Pull complete
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest

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 Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/userguide/

安装成功!

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/26559.html

相关文章

  • CentOS上面搭建Docker

    摘要:在上面搭建一个不要为我为什么不用因为某种我不想说的原因。环境要求要求系统必须在以上,内核版本必须是以上查看版本查看内核版本安装运行命令第一条命令是更新下现有库。启动测试下安装是否成功使用著名的安装成功 在CentOS上面搭建一个Docker,不要为我为什么不用Ubuntu(因为某种我不想说的原因^_^)。 环境要求 Docker要求系统必须在CentOS 6以上,内核版本必须是2.6....

    lanffy 评论0 收藏0
  • Docker搭建Apache+PHP+mysql环境的过程记录

    摘要:主要记录了搭建所用到的工具,使用的命令和遇到的坑。二搭建服务器环境验证是否启动打开,输入如果输出版本信息的话,表示启动成功。使用镜像加速下载镜像时,必须输入完整的库名和镜像名。 这是一篇搭建Docker环境的过程记录,方便以后查看。主要记录了搭建所用到的工具,使用的命令和遇到的坑。 一、安装Docker 第一步肯定是到Docker的官网(https://www.docker.com)上...

    geekidentity 评论0 收藏0
  • Docker搭建Apache+PHP+mysql环境的过程记录

    摘要:主要记录了搭建所用到的工具,使用的命令和遇到的坑。二搭建服务器环境验证是否启动打开,输入如果输出版本信息的话,表示启动成功。使用镜像加速下载镜像时,必须输入完整的库名和镜像名。 这是一篇搭建Docker环境的过程记录,方便以后查看。主要记录了搭建所用到的工具,使用的命令和遇到的坑。 一、安装Docker 第一步肯定是到Docker的官网(https://www.docker.com)上...

    cyqian 评论0 收藏0

发表评论

0条评论

Dr_Noooo

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<