Docker can be installed from two different channels, each one with advantages and disadvantages
Stable channel: As the name indicates, everything you install from this channel is fully tested and you will have the latest GA version of the Docker engine. This is the most reliable platform and therefore, suitable for production environments. Through this channel, the releases follow a version schedule with long testing and beta times, only to ensure that everything should work as expected.
Beta channel: If you need to have the latest features, this is your channel. All the installers come with the experimental version of the Docker engine where bugs can be found, so it is not recommended for production environments. This channel is a continuation of the Docker beta program where you can provide feedback and there is no version schedule, so you will have more frequent releases.
we can download the Docker for Mac from the
official page, that is h t t p s ://w w w . d o c k e r . c o m /p r o d u c t s /d o c k e r
The Docker ecosystem was developed on top of Linux, so the installation process on this OS is easier. Installation on Community
ENTerprise Operating System (CentOS)/Red Hat Enterprise Linux (RHEL) (we use yum as the package manager) and Ubuntu (uses apt as the package manager).
The minimum requirement to install and execute Docker is to have a 64-bit OS and a kernel version 3.10 or higher. If you need to know your current version, you can open a terminal and execute the following command:
$ uname -r
3.10.0-229.el7.x86_64
Note that it's recommended to have your OS up to date as it will avoid any potential kernel bugs.
Installing Docker using yum
First of all, we need to have a user with root privileges; we can log in on your machine as this user or use a sudo command on the terminal of your choice. In the following steps, we assume that you are using a root or privileged user (add sudo to the commands if you are
not using a root user). First of all, ensure that all your existing packages are up to date:
yum update
Now that your machine has the latest packages available, you need to add the official
Docker yum repository:
# tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
After adding the yum repository to our CentOS/RHEL, we can easily install the Docker
package with the following command:
yum install docker-engine
You can add the Docker service to the startup of your OS with the systemctl command
(this step is optional):
systemctl enable docker.service
The same systemctl command can be used to start the service:
systemctl start docker
Now we have everything installed and running, so we can start testing and playing with Docker
Listed are the commands to create a Docker group:
groupadd docker
usermod -aG docker my_username
Installing Docker using apt
First of all, ensure that you have your apt sources pointing to the Docker repository,
especially if you have previously installed Docker from the apt. In addition to this, update
your system:
apt-get update
Now that you have your system up to date, it is time to install some required packages and
the new GPG key:
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys
58118E89F3A912897C070ADBF76221572C52609D
With Ubuntu, it is very easy to add the official Docke
po:
apt-get purge lxc-docker
On Trusty and Xenial, it is recommended that you install the linux-image-extra-*
kernel package that allows you to use the AFUS storage driver. To install them, run the
following command:
apt-get update && apt-get install linux-image-extra-$(uname -r) linuximage-
extra-virtual
On Precise, Docker requires a 3.13 kernel version, so ensure that you have the correct
kernel; if your version is older, you must upgrade it.
At this point, your machine will be more than ready to install Docker. It can be done with a
single command, as with yum:
apt-get install docker-engine
Now that you have everything installed and running, you can start playing and testing
Docker.