Latest web development tutorials

CentOS Docker installation

Docker CentOS version supports the following:

  • CentOS 7 (64-bit)
  • CentOS 6.5 (64-bit) or later

Prerequisites

Currently, CentOS kernel release only support Docker.

Docker running on CentOS 7, requires a 64-bit system, kernel version 3.10 or higher.

Docker running on CentOS-6.5 or higher version of CentOS, the system requirements for the 64-bit kernel version 2.6.32-431 or later.


Use yum install (CentOS 7 below)

Docker requirements CentOS system kernel version higher than 3.10, a prerequisite for viewing this page to verify your CentOS version supports Docker.

By uname -r command to view your current kernel version
[root@w3big ~]# uname -r 3.10.0-327.el7.x86_64

Installation Docker

Docker packages and dependencies are already included in the default CentOS-Extras source software, the install command as follows:

[root@w3big ~]# yum -y install docker

The installation is complete.

Docker start background service

[root@w3big ~]# service docker start

Hello-world test run

[root@w3big ~]#docker run hello-world

Since no local hello-world of the image, it will download a hello-world mirroring, and run within the container.


Uses scripts to install Docker

1, using sudo or root login Centos privileges.

2, to ensure that the yum package updated to the latest.

$ sudo yum update

3, the implementation Docker installation script.

$ curl -fsSL https://get.docker.com/ | sh

Execute this script adds docker.repo source and install Docker.

4, start Docker process.

$ sudo service docker start

5. Verify docker installed successfully test and execute a mirror in the container.

$ sudo docker run hello-world

This, docker complete the installation CentOS system.