docker这么火,我也想玩玩 centos6.5

centos6.5 64bit

安装epel,参考我转的这个博文

http://blog.csdn.net/defeattroy/article/details/45440051

[[email protected] ~]# yum update

[[email protected] ~]# yum install docker-io

[[email protected] ~]# service docker start

[ro[email protected] ~]# chkconfig docker on

[[email protected] ~]# docker pull centos

Pulling repository centos

fd44297e2ddb: Download complete

6941bfcbbfca: Download complete

41459f052977: Download complete

Status: Downloaded newer image for centos:latest

[[email protected] ~]# docker images centos

REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

centos              latest              fd44297e2ddb        10 days ago         215.7 MB

centos              centos7             fd44297e2ddb        10 days ago         215.7 MB

centos              7                   fd44297e2ddb        10 days ago         215.7 MB

[[email protected] ~]# uname -a

Linux 172.16.18.20 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[[email protected] ~]# cat /etc/redhat-release

CentOS release 6.6 (Final)

[[email protected] ~]# docker run -i -t centos /bin/bash

[[email protected] /]# cat /etc/redhat-release

CentOS Linux release 7.1.1503 (Core)

[[email protected] /]# uname -a

Linux da69b38a7e5f 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

可以看到在进入容器前(黄色)后(蓝色),内核一样,发行版本不一样了

参考:

https://docs.docker.com/installation/centos/#starting-the-docker-daemon

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CentOS

Docker is supported on the following versions of CentOS:

These instructions are likely work for other binary compatible EL6/EL7 distributions such as Scientific Linux, but they haven‘t been tested.

Please note that due to the current Docker limitations, Docker is able to run only on the64 bit architecture.

Kernel support

Currently the CentOS project will only support Docker when running on kernels shipped by the distribution. There are kernel changes which will cause issues if one decides to step outside that box and run non-distribution kernel packages.

To run Docker on CentOS-6.5 or later, you will need kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow Docker to run.

Installing Docker - CentOS-7

Docker is included by default in the CentOS-Extras repository. To install run the following command:

$ sudo yum install docker

Please continue with the Starting the Docker daemon.

FirewallD

CentOS-7 introduced firewalld, which is a wrapper around iptables and can conflict with Docker.

When firewalld is started or restarted it will remove the DOCKER chain from iptables, preventing Docker from working properly.

When using Systemd, firewalld is started before Docker, but if you start or restartfirewalld after Docker, you will have to restart the Docker daemon.

Installing Docker - CentOS-6.5

For CentOS-6.5, the Docker package is part of Extra Packages for Enterprise Linux (EPEL) repository, a community effort to create and maintain additional packages for the RHEL distribution.

Firstly, you need to ensure you have the EPEL repository enabled. Please follow theEPEL installation instructions.

For CentOS-6, there is a package name conflict with a system tray application and its executable, so the Docker RPM package was calleddocker-io.

To proceed with docker-io installation on CentOS-6, you may need to remove thedocker package first.

$ sudo yum -y remove docker

Next, let‘s install the docker-io package which will install Docker on our host.

$ sudo yum install docker-io

Please continue with the Starting the Docker daemon.

Manual installation of latest Docker release

While using a package is the recommended way of installing Docker, the above package might not be the current release version. If you need the latest version,you can
install the binary directly
.

When installing the binary without a package, you may want to integrate Docker with Systemd. For this, install the two unit files (service and socket) fromthe
GitHub repository
to /etc/systemd/system.

Please continue with the Starting the Docker daemon.

Starting the Docker daemon

Once Docker is installed, you will need to start the docker daemon.

$ sudo service docker start

If we want Docker to start at boot, we should also:

$ sudo chkconfig docker on

Now let‘s verify that Docker is working. First we‘ll need to get the latest
centos
image.

$ sudo docker pull centos

Next we‘ll make sure that we can see the image by running:

$ sudo docker images centos

This should generate some output similar to:

$ sudo docker images centos
REPOSITORY      TAG             IMAGE ID          CREATED             VIRTUAL SIZE
centos          latest          0b443ba03958      2 hours ago         297.6 MB

Run a simple bash shell to test the image:

$ sudo docker run -i -t centos /bin/bash

If everything is working properly, you‘ll get a simple bash prompt. Type
exit
to continue.

Custom daemon options

If you need to add an HTTP Proxy, set a different directory or partition for the Docker runtime files, or make other customizations, read our Systemd article to learn how tocustomize
your Systemd Docker daemon options
.

Dockerfiles

The CentOS Project provides a number of sample Dockerfiles which you may use either as templates or to familiarize yourself with docker. These templates are available on GitHub athttps://github.com/CentOS/CentOS-Dockerfiles

Done! You can either continue with the Docker User Guide or explore and build on the images yourself.

时间: 2024-08-04 15:56:57

docker这么火,我也想玩玩 centos6.5的相关文章

centos6.5上使用docker

工作忙的都没时间写技术博客了,赶紧写点 最新的docker是1.7.x的,要想在centos6.5上使用就要升级到3.10内核 1.安装elrepo源(硬件驱动的第三方库,里面有内核yum源) rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm 2.安装长期稳定版内核(3.10.x) yum --enablerepo=elrepo-kernel install kernel-lt -y 3.修改开机引导

Centos6.5 安装配置docker

宿主机:win7 64位 vagrant封装环境运行在VirtualBox 虚拟机上CentOS6.5,这是做测试时的一个环境,顺便错用安装docker玩玩. centos6.5可以直接安装docker,docker在centos6及以后的版本中都可以安装,如果你的6版系统中不能安装先配置一下EPEL库来安装 yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm yum install doc

在centos6.x和centos7.x环境下停机扩容docker的pool空间

一.首先介绍一下docker的存储驱动Device Mapper插件的工作原理 如果在CentOS .REHL .Fedor或者其他默认没有 AUFS支持的Linux发行版上使用Docker,你需要用到Device Mapper的存储插件.将这个插件设置为默认,它会把你所有的容器存储到一个100G的简短文件中,并且限制每个容器最大为10GB.最初Docker仅能在支持Aufs文件系统的Linux发行版上运行,但是由于Aufs未能加入Linux内核,为了寻求兼容性.扩展性,Docker在内部通过g

docker入门篇

基础知识不回顾了,直接上. docker的安装与启动 yum remove docker -y yum install docker-io -y # 需要先配置好epel源 /etc/init.d/docker start chkconfig docker on 获取镜像 docker pull centos       # 从docker仓库下载一个镜像例如:docker pull centos:6.7 docker images            #列出本地已存在的镜像 docker i

关于容器、虚拟机以及 Docker 的一个入门教程

Yves yao · 2017-09-05翻译 · 1315阅读 原文链接 huangxiaolu审校 源地址:http://zcfy.cc/article/a-beginner-friendly-introduction-to-containers-vms-and-docker-4139.html?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io Source: https://flipboard.com/topic/

一键架设FastDFS分布式文件系统脚本,基于Centos6

一.使用背景 业务驱动技术需要,原来使用 FTP和 Tomcat upload目录的缺陷日渐严重,受限于业务不断扩大,想使用自动化构建,自动化部署,Zookeeper中心化,分布式RPC DUBBO等技术时,遇到文件存储的瓶颈,因此需求一个使用分布式文件系统注入新的活力. 二.环境 参考 http://blog.csdn.net/hhq163/article/details/46536895 这个博主的博客安装比较新 FastDFS 版本. 在 Docker 下 使用最小化安装的 Centos6

docker随谈

最近在搞Docker,其实去年就听老师说过这个东西,说非常火,当时不以为然,还错把它当成docky.当时想想docky不就是一个快速启动工具么,有什么.现在想想真是惭愧... Docker的牛逼之处网上找找也有一大堆:轻量化.占用系统资源少(基本不占用).部署快.扩展性强,可以说是虚拟化的未来. Docker直接作用在宿主机上,不需要虚拟机管理系统.下图摘自网上: 可以看出使用Docker比一般的虚拟机少了两层东西,可见Docker的轻量. Docker诞生之初也是为了能让开发者更专心的做开发,

docker专题(2):docker常用管理命令(上)

http://segmentfault.com/a/1190000000751601 本文只记录docker命令在大部分情境下的使用,如果想了解每一个选项的细节,请参考官方文档,这里只作为自己以后的备忘记录下来. 根据自己的理解,总的来说分为以下几种: 容器生命周期管理 — docker [run|start|stop|restart|kill|rm|pause|unpause] 容器操作运维 — docker [ps|inspect|top|attach|events|logs|wait|ex

Docker — 云时代的程序分发方式

要说最近一年云计算业界有什么大事件?Google Compute Engine 的正式发布?Azure入华?还是AWS落地中国?留在每个人大脑中的印象可能各不相同,但要是让笔者来排名的话那么Docker绝对应该算是第一位的.如果你之前听说过它的话,那么也许你会说"没错,就是它",因为几乎世界各地的开发.运维都在谈论着Docker:如果你还没听说过Docker,那么我真的建议你花上10分钟来阅读本文. 1. Docker简介 1.1. 什么是Docker? Docker是一个重新定义了程