Docker installing CentOS
CentOS (community enterprise operating system) is one of the Linux distributions. It is compiled from the source code released by Red Hat Enterprise Linux (RHEL) in accordance with the open source regulations. Due to the same source code, some servers requiring high stability use CentOS instead of the commercial version of Red Hat Enterprise Linux. Recommended distributed architecture source code
1. View available CentOS versions
Access CentOS image library address:
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:
2. Pull the CentOS image of the specified version. Here we install the specified version as an example (centos7):
$ docker pull centos:centos7
3. View local mirror
Use the following command to see if centos7 is installed:
$ docker images
4. Run the container and enter the CentOS container through the exec command.
$ docker run -itd --name centos-test centos:centos7
5. Installation succeeded
Finally, we can view the operation information of the container through the docker PS command: