Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

How to install Docker on Linux

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. This is step by step guide how to install docker on Linux. I am using CentOS 7 as operating system. I have configured direct internet access on the linux, all the software packages will be directly downloaded and installed from internet.

Cannot connect to the Docker daemon at unix:var run docker.sock. Is the docker daemon running

I updated yum repository, It allows users and system administrator to easily install, update, remove or search software packages on a systems. Reboot Linux server if required. Install yum-utils packages.

sudo yum update -y
sudo yum install yum-utils

yum-utils software package is installed with required dependancies libxml2-python, python-chardet and python-kitchen automatically from online.

install-sudo-yum-install-7-yum-utils-install-docker-on-centos-7-docker-community-version-python-kitchen-libxml2-python-dependencies-resolved-1024x903.png

Next download docker community edition repo file, where all the information related to docker is stored, from where to download docker packages, I am using docker community edition.

sudo yum install d-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

What is Docker Community Edition?
It’s a do-it-yourself, community supported version of Docker that’s available for free of cost. Docker Engine has been renamed to Docker Community Edition, and, as the name suggests.

The community edition will be available in two versions: Edge and Stable. Edge will be released each month with the latest features. Stable will be released on a quarterly basis. While Edge will receive security updates and bug fixes for the current release, the stable version will get similar updates for four months after the initial release. This update cycle will give users a big enough window to plan upgrades from older versions.

While the two versions are targeted at different audiences, there isn’t much, or any, difference at source code level. “Both Docker EE and CE are based on the open source Docker project, which is developed in the open with Docker’s community of partners and contributors, and this forms the open, modular core of all Docker CE and EE editions,” said Messina."

What is Docker Enterprise Edition?
Docker Enterprise Edition comes in three versions: basic, standard and advanced. The Basic edition comes with the Docker platform, support and certification, while the Standard and Advanced version add additional features such as container management (Docker Datacenter) and Docker Security Scanning.

Docker is also offering a certification program to help third-party vendors in ensuring their products work with Docker EE.

Docker EE is supported by Alibaba, Canonical, HPE, IBM, Microsoft and by a network of regional partners. Those who want to test Docker EE can download a trial version for free from the official site.

sudo-yum-install-d-config-manager-add-repo-download.docker.com-linux-centos-docker-ce.repo-install-docker-on-linux-subsytem-1024x106.png

There is another substitute command to above command to configure docker-ce repo. This repo file is downloaded and saved to /etc/yum.repos.d/docker-ce.repo path.

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install-docker-on-yum-config-manager-add-reop-download-docker-community-repo-configuration-docker-ce.repo_-1024x126.png

Docker Engine Community has three types of update channels, stable, test, and nightly: Stable gives you latest releases for general availability. Test gives pre-releases that are ready for testing before general availability. Nightly gives you latest builds of work in progress for the next major release.

sudo yum-config-manager --enable docker-ce-nightly

sudo-yum-config-manager-enable-docker-ce-nighly-install-docker-on-centos-configure-docker-repository-for-installation-docker-1024x943.png

This is a final command to install docker-ce, docker-ce-cli and containerd.io (Required packages for docker-ce).

sudo yum install docker-ce docker-ce-cli containerd.io

sudo-yum-install-docker-ce-docker-ce-cli-containerd.io-install-docker-dependencies-reolved-install-docker-packages-on-linux-1024x976.png

Once docker installation is completed, check docker is installed by checking its version.

docker version

how-to-install-docker-on-centos-linux-docker-version-client-docker-engine-community-Cannot-connect-to-the-docker-daemon-at-unix-var-run-docker.sock-is-the-docker-daemon-running-1024x157.png

In the last disable docker-ce-nightly in yum-config-manager. In next article I will show how to build container on docker.

sudo yum-config-manager --disable docker-ce-nightly

sudo-yum-config-manager-disable-docker-ce-nightly-install-docker-container-on-linux-centos-redhatr-operating-sytem-containarization-1024x257.png

Useful Article
How to install Ansible on Linux for vSphere configuration
PART 1 : BUILDING AND BUYING GUIDE IDEAS FOR VMWARE LAB
PART 2 : BUILDING AND HARDWARE BUYING GUIDE IDEAS FOR VMWARE LAB
PART 3 : MY VSPHERE LAB CONFIGURATION ON VMWARE WORKSTATION

Go Back

Comment

Blog Search

Page Views

3098858

Follow me on Blogarama