YouTip LogoYouTip

Docker Install Centos

# Docker Install 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 open-source regulations. Since it comes from the same source code, some servers requiring high stability use CentOS as a replacement for the commercial Red Hat Enterprise Linux. ### 1. Check Available CentOS Versions Visit the CentOS image repository address: [https://hub.docker.com/_/centos?tab=tags&page=1](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 the Specified Version of the CentOS Image. Here we take installing a specific version as an example (centos7): $ docker pull centos:centos7 [!(#)](#) ### 3. Check Local Images Use the following command to check if centos7 has been 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 container's running information with the `docker ps` command: [!(#)](#)
← Docker Pause Unpause CommandDocker Kill Command β†’