Easy Tutorial
❮ Home Docker Create Command ❯

Docker Installation on CentOS

CentOS (Community Enterprise Operating System) is one of the Linux distributions, compiled from the source code released under the open-source license from Red Hat Enterprise Linux (RHEL). Due to the same source code, some servers requiring high stability use CentOS instead of the commercial version of Red Hat Enterprise Linux.

1. Check Available CentOS Versions

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

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

You can also find other versions you want in the dropdown list:

2. Pull a Specific Version of CentOS Image, Here We Install a Specific Version (centos7):

$ docker pull centos:centos7

3. Check Local Images

Use the following command to see if centos7 is installed:

$ docker images

4. Run the Container and Enter the CentOS Container via the exec Command.

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

5. Installation Successful

Finally, we can check the running information of the container using the docker ps command:

❮ Home Docker Create Command ❯