CentOS (Community Enterprise Operating System) is one of the Linux distributions, which is compiled from the source code released by Red Hat Enterprise Linux (RHEL) in accordance with open source regulations. Because it comes from the same source code, some servers that require high stability replace the commercial version of Red Hat Enterprise Linux with CentOS. Access CentOS Mirror 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 of centos:latest. ` <../wp-content/uploads/2019/11/docker-centos1.png>` __ You can also find other versions you want in the drop-down list: ` <../wp-content/uploads/2019/11/docker-centos2.png>` __ ` <../wp-content/uploads/2019/11/docker-centos3.png>` __ Use the following command to see if centos7 is installed: ` <../wp-content/uploads/2019/11/docker-centos4.png>` __ ` <../wp-content/uploads/2019/11/dcoker-centos6.png>` __ Finally, we can view the running information of the container through the docker ps command: ` <../wp-content/uploads/2019/11/docker-centos7.png>` __ 2.19.1. 1. View the available CentOS versions ¶
2.19.2. 2. Pull the specified version of the CentOS image. Here we install the specified version as an example (centos7) ¶
$ docker pull centos:centos7
2.19.3. 3. View the local image ¶
$ docker images
2.19.4. 4. Run the container, and you can enter the CentOS container through the exec command. ¶
$ docker run -itd --name centos-test centos:centos7
2.19.5. 5. Installation succeeded ¶