Home>Article>Operation and Maintenance> Can docker install centos?

Can docker install centos?

WBOY
WBOY Original
2022-08-16 17:08:07 6426browse

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.

Can docker install centos?

The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.

docker can install centos

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.

Can docker install centos?

Pull the CentOS image of the specified version. Here we install the specified version as an example (centos7):

$ docker pull centos:centos7

Can docker install centos?

2. Check the local image

Use the following command to check whether centos7 has been installed:

$ docker images

Can docker install centos?

Run the container and enter the CentOS container through the exec command.

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

Can docker install centos?

3. Installation successful

Finally we can view the running information of the container through the docker ps command:

Can docker install centos?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Why does docker use tags? Next article:Why does docker use tags?