Loading, please wait...

A to Z Full Forms and Acronyms

How To Install and Use Docker on CentOS 7

Jun 24, 2021 Docker, CentOS, 2471 Views
This article will help the person to learn installation of Docker on CentOS 7
Docker is an application that makes it straightforward and simple to run application forms in a holder, which resemble virtual machines, just increasingly compact, more asset amicable, and progressively subject to the host working framework. For a point by point prologue to the various segments of a Docker compartment, look at The Docker Ecosystem: An Introduction to Common Components.
There are two strategies for introducing Docker on CentOS 7. One strategy includes introducing it on a current establishment of the working framework. The different includes turning up a server with an instrument called Docker Machine that auto-introduces Docker on it.
In this instructional exercise, you'll figure out how to introduce and utilize it on a current establishment of CentOS 7.
• 64-bit CentOS 7
 

Installing Docker
 

The Docker installation package accessible in the authority CentOS 7 store may not be the most recent adaptation. To get the best in class variant, introduce Docker from the official Docker vault. This segment tells you the best way to do only that.
But first, let’s update the package database:

$ sudo yum check-update
 
Now run the command. It will download the official repository and latest version of docker and install it
$curl -fsSL https://get.docker.com/ | sh

After installation completed, start the Docker daemon:
$sudo systemctl start docker

Check that it's running:
$sudo systemctl status docker

The output is similar to the following, showing that the service is active and running
Output
$ docker.service - Docker Application Container Engine

   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-11-06 06:53:52 CDT; 1 weeks 3 days ago
     Docs: https://docs.docker.com
 Main PID: 749 (docker)
 
Lastly, make sure it starts at every server reboot:
$ sudo systemctl enable docker

Installing Docker currently gives you the Docker service (daemon) yet additionally
the docker command line utility, or the Docker customer. We'll investigate how to utilize the docker command later in this Article
 
Using the Docker Command
 
With Docker introduced and working, presently's an ideal opportunity to get comfortable with the direction line utility. Utilizing ‘docker’comprises of passing it a chain of choices and sub commands pursued by contentions. The syntax takes this form:
$ docker [option] [command] [arguments]

To view all available subcommands, type:
$ docker info
A to Z Full Forms and Acronyms

Related Article