Home > Article > Operation and Maintenance > Can docker install centos?
docker can install centos. Installation method: 1. Check the available centos version and use "docker pull centos:centos7" to pull the image of the specified version; 2. Check the local image and use "docker run" to run the container; 3. Use the "docker ps" command. You can view container running information.
The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.
CentOS (Community Enterprise Operating System) is one of the Linux distributions. It is the source code released from Red Hat Enterprise Linux (RHEL) in accordance with open source code regulations. compiled. Because 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.
1. View available CentOS versions
You can view other versions of CentOS through Sort by. The default is the latest version centos:latest.
Pull the CentOS image of the specified version. Here we install the specified version as an example (centos7):
$ docker pull centos:centos7
2. Check the local image
Use the following command to check whether centos7 has been installed:
$ docker images
Run the container and enter the CentOS container through the exec command.
$ docker run -itd --name centos-test centos:centos7
3. Installation successful
Finally we can view the running information of the container through the docker ps command:
Recommended learning: "docker video tutorial"
The above is the detailed content of Can docker install centos?. For more information, please follow other related articles on the PHP Chinese website!