The best CentOS Docker installation Tutorial In 2024, In this tutorial you can learn Prerequisites,Use yum install (CentOS 7 below),Uses scripts to install Docker,
Docker CentOS version supports the following:
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.
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
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.
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.