Prerequisites
To install CS Docker Engine, you need root or sudo privileges and you need access to a command line on the system.
Install using a repository
Install on CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2/7.3 (YUM-based systems)
This section explains how to install on CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2/7.3. Only these versions are supported. CentOS 7.0 is not supported. On RHEL, depending on your current level of updates, you may need to reboot your server to update its RHEL kernel.
- Add the Docker public key for CS Docker Engine packages:
$ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
Note: If the key server above does not respond, you can try one of these:- pgp.mit.edu
- keyserver.ubuntu.com
- Install yum-utils if necessary:
$ sudo yum install -y yum-utils
- Add the Docker repository:
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
This adds the repository of the latest version of CS Docker Engine. You can customize the URL to install an older version. - Install Docker CS Engine:
- Latest version:
$ sudo yum makecache fast $ sudo yum install docker-engine
- Specific version:On production systems, you should install a specific version rather than relying on the latest.
- List the available versions:
$ yum list docker-engine.x86_64 --showduplicates |sort -r
The second column represents the version. - Install a specific version by adding the version after
docker-engine
, separated by a hyphen (-
):$ sudo yum install docker-engine-
- Configure
devicemapper
:By default, thedevicemapper
graph driver does not come pre-configured in a production-ready state. Follow the documented step by step instructions to configure devicemapper with direct-lvm for production to achieve the best performance and reliability for your environment. - Configure the Docker daemon to start automatically when the system starts, and start it now.
$ sudo systemctl enable docker.service $ sudo systemctl start docker.service
- Confirm the Docker daemon is running:
$ sudo docker info
- Only users with
sudo
access will be able to rundocker
commands. Optionally, add non-sudo access to the Docker socket by adding your user to thedocker
group.$ sudo usermod -a -G docker $USER
1 comment:
commands works. Keep sharing Devops Online Course
Post a Comment