

To exit from an image, we need to press CTRL+D. The option -i means that we will make the image interactive, while the option -t means we will have access to a terminal and can simulate one. We will be able to call the image by its ID or directly by its name. docker search centos7Īnd if we want to download it, we can do it with the following command: docker pull įinally, to execute it we will use the run command. docker search įor example, we can search for an image related to CentOS 7. Or search the Docker repository for an available image with the search command.


We can verify all the images we have in our system with this command: docker images This test image is the one that Docker recommends checking every time you reinstall the utility. To do it, we need to run the following command: docker run hello-world Docker Basicsįirst, let us run Docker’s “Hello World” command as a start.

In the output we should see a green line indicating that Docker is up and running. But it’s not running yet! To enable and start docker, execute the following commands: systemctl enable docker systemctl start dockerįinally, we can check the status of the service to check that everything has gone well: systemctl status docker We now know how to install Docker on CentOS. To do this, it is necessary to execute this line: yum-config-manager -add-repo Īfter that, we can install Docker on CentOS 7 by running the following command: yum install docker-ce The easiest and safest way to complete the process is through Docker’s official repositories. We need to be the root user and run the following line in the command line: yum install -y yum-utils device-mapper-persistent-data lvm2 ssh we have to install a series of packages prior to installing Docker. Check out our PuTTY tutorial if you’re having issues. To do this, it is necessary to connect to our server using SSH. You can read more about it in their official website. We recommend keeping that in mind when choosing this OS. While CentOS Linux 7 is still supported, it will reach EOL on. Important! CentOS Linux 8 has reached it’s End of Lifetime (EOL) on.
