Docker Installation Under Linux System

Docker installation Introduction:

Docker installation.System Requirements This installation tutorial is limited to CentOS7, other systems are not applicable. The centos-extras repository must be enabled. The default state of this repository is enabled. If it is not enabled, please modify it. Uninstalling old versions of Docker Old versions of Docker are called docker or docker-engine.

Docker installation.System Requirements


This installation tutorial is limited to CentOS7, other systems are not applicable. The
centos-extras repository must be enabled. The default state of this repository is enabled. If it is not enabled, please modify it.

Docker installationUninstall older versions of Docker


Older versions of Docker were called docker or docker-engine . The current Docker versions are Docker CE (Community Edition) and Docker EE (Enterprise Edition). Under normal circumstances, we can use Docker CE (Community Edition). If your system has older versions installed, uninstall them and their associated dependencies. The command is as follows:
If an older version of Docker is not installed on your system, the following prompt will appear:

Plugin loaded: fastestmirror
Argument docker does not match
Parameter docker- client does not match
Parameter docker- client -latest does not match
Parameter docker- common does not match
Argument docker-latest does not match
Parameter docker-latest- logrotate did not match
Parameter docker- logrotate did not match
The parameter docker-engine does not match
do not remove any packages

Docker installation.Install Docker

Docker CE for the first time on the host , you need to set up the Docker repository. Docker can be installed and updated from this repository later.
Set up warehouse

Install the required packages, yum - utils provides the yum-config-manager tool, device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver. The installation command is as follows:

Docker installation.Install Docker CE


•Install the latest version of Docker CE
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ _

For more examples and ideas, visit:
https://docs.docker.com/get-started/ _ _ _
Indicates that the installation was successful.

Docker uninstall
•Uninstall the Docker package
$ sudo yum remove docker- ce
•Images, containers, custom configuration files, etc. are not automatically deleted when Docker is uninstalled. You need to execute the following command to delete them manually:
$ sudo rm -rf /var/ lib / docker
At this point, the installation and uninstallation process of Docker has been introduced to you.