Install Docker in RedHat/CentOS (without upgrading the kernel)

Source: Internet
Author: User

Background

Due to kernel version problems, only Ubuntu can better support Docker at first. However, because the RedHat series OS (REHL, CentOS) is currently the mainstream Linux server operating system, it is necessary for the RedHat series OS to support Docker. At present, Docker and RedHat have started in-depth cooperation and launched Docker0.7 that can run on the RedHat series OS at the end of 2013.

Some blogs have introduced how to install Docker on CentOS, for example. However, these blogs are for old versions of Docker. The installation method is based on the upgrade of the operating system kernel version. The problem is that we cannot upgrade the operating system kernel version of the production environment at will, and the purpose of Docker0.7 is that Docker users can use Docker in the RedHat environment without upgrading the kernel. Therefore, I am writing a blog here to introduce how to install the new version of Docker in the RedHat/CentOS environment.

1. Disable selinux
Because Selinux conflicts with LXC, selinux must be disabled. Edit/etc/selinux/config and set two key variables.
SELINUX = disabled
SELINUXTYPE = targeted

Ii. Configure the Fedora EPEL Source
1 sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

3. Add the ingress 5.repo Source

Cd/etc/yum. repos. d
Sudo wget http://www.hop5.in/yum/el6/hop5.repo

4. Install Docker
Sudo yum install docker-io

Figure 1 shows that only docker and lxc packages are installed during yum installation, and there is no kernel package, such as kernel-ml-aufs.

Figure 1 yum install docker-io output


5. Preliminary verification of docker
Enter docker-h. If the following output is displayed, it indicates that docker has been installed successfully.

# 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 previusly running containers
-S = "": Force the docker runtime to use a specific storage driver
-V = false: Print version information and quit

Docker details: click here
Docker: click here

New virtualization options for the open-source project Docker and Red Hat

Dockerlite: lightweight Linux Virtualization

Detailed explanation of the entire process of building Gitlab CI for Docker

What is the difference between Docker and a normal Virtual Machine?

Docker will change everything

  • 1
  • 2
  • Next Page

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.