Installing Docker CE by running convenience scripts

The third way to install Docker is to use the convenience scripts provided by Docker. The scripts allow you to install either the latest edge version or the latest test version of Docker. It is not recommended that either of these is used in a production environment, but they do serve a purpose for testing and developing the latest Docker versions. The scripts are somewhat limited in that they do not allow you to customize any options during the install. The same scripts can be used across a variety of Linux distributions as they determine the base distro you are running and then do the install based on that determination. The process is simple.

Use curl to pull down the desired script, and then use sudo to run the script.

The commands to run the latest edge version are as follows:

# download and run the install script
curl -fsSL get.docker.com -o get-docker.sh

sudo sh get-docker.sh

Executing the script will result in output that looks like the following:

The docker group has been created for you by the script, but since CentOS is RPM centric, you still need to start the Docker service yourself:

# start docker
sudo systemctl start docker
If this were a Debian-based system, the Docker service would have been started automatically by the script.

Now that we have examined the three ways to install Docker on your CentOS workstation, it is a good time to discuss a few additional steps that are recommended in your post-installation setup.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset