Installing Docker under Redhat/centos (without upgrading the kernel)

Source: Internet
Author: User

Background

Because of kernel version issues, only Ubuntu can support Docker at first. However, since the Redhat series OS (Rehl, CentOS) is currently the mainstream Linux server operating system, it is necessary to enable the Redhat series OS to support Docker. Currently, Docker and Redhat have been working in-depth, and at the end of 2013 launched a Docker0.7 that could be run on the Redhat series OS.

There are some blogs about installing Docker on CentOS, such as http://www.linuxidc.com/Linux/2014-01/95512.htm. But these blogs are for older versions of Docker, and the installation method is done on the basis of upgrading the OS kernel version. The problem is that we are not free to upgrade the operating system kernel version of the production environment, and the main thrust of Docker0.7 is that Docker users can use Docker in the Redhat environment without upgrading the kernel. So write a blog here about how to install a new version of Docker in a redhat/centos environment.

First, disable SELinux
SELinux is disabled due to the conflict between SELinux and LXC. Edit/etc/selinux/config, set two key variables.
Selinux=disabled
selinuxtype=targeted

Second, configure Fedora Epel source
1 sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

Third, add Hop5.repo source

Cd/etc/yum.repos.d
sudo wget Http://www.hop5.in/yum/el6/hop5.repo

Iv. installation of Docker
sudo yum install Docker-io

Figure 1 is the Yum installation process and you can see that the installed software is only Docker and LXC related packages, no kernel packages, such as Kernel-ml-aufs.

Figure 1 Yum Install Docker-io output


V. Preliminary verification of Docker
Enter Docker-h, and if you have the following output, it proves that Docker has been successfully installed in the form.

# docker-h
Usage of Docker:
-d=false:enable Debug Mode
-h=[]: Multiple tcp://host:port or unix://path/to/socket to bind in daemon mode, single connection otherwise
-api-enable-cors=false:enable cors headers in the remote API
-b= "": Attach containers to a pre-existing network bridge; Use ' None ' to disable container networking
-bip= "": Use this CIDR notation address for the Network Bridge's IP, not compatible with-b
-d=false:enable Daemon Mode
-dns=[]: Force Docker-to-use specific DNS servers
-g= "/var/lib/docker": Path to use as the root of the Docker runtime
-icc=true:enable Inter-container Communication
-ip= "0.0.0.0": Default IP Address to use when binding container ports
-iptables=true:disable Docker ' s addition of iptables rules
-p= "/var/run/docker.pid": Path to use for daemon PID file
-r=true:restart previously running containers
-s= "": Force the Docker runtime to use a specific storage driver
-v=false:print version information and quit

more about Docker : please click here
Docker's : please click here

Open source project docker,red hat new virtualization Choice http://www.linuxidc.com/Linux/2013-10/91051.htm

Dockerlite: Lightweight Linux Virtualization Http://www.linuxidc.com/Linux/2013-07/87093.htm

Docker construction Gitlab CI Full-process detailed http://www.linuxidc.com/Linux/2013-12/93537.htm

What is the difference between Docker and a normal virtual machine? Http://www.linuxidc.com/Linux/2013-12/93740.htm

Docker will change everything http://www.linuxidc.com/Linux/2013-12/93998.htm

Installing Docker under Redhat/centos (without upgrading the kernel)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.