English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Install CentOS with Docker

CentOS (Community Enterprise Operating System) is one of the Linux distributions, compiled from the source code released according to the open source specification of Red Hat Enterprise Linux (RHEL). Since it comes from the same source code, some servers that require high stability use CentOS instead of the commercial version of Red Hat Enterprise Linux.

1View available CentOS versions

Visit the CentOS image library address:https://hub.docker.com/_/centos?tab=tags&page=1.

You can view other versions of CentOS through Sort by. The default is the latest version centos:latest.

You can also find other versions you want in the drop-down list:

2Pull the specified version of the CentOS image, here we take the installation of the specified version as an example (centos7):

$ docker pull centos:centos7

3View local images

Use the following command to check if centos is installed:7:

$ docker images

4Run the container and you can enter the CentOS container through the exec command.

$ docker run -itd --name centos-test centos:centos7


5Successfully installed

We can view the container's running information through the docker ps command: