12.05.15



docker INSTALL COMMANDS





1.) sudo yum install -y yum-utils



Installs yum utilities

Yum utilities are a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and more powerful to use. For more options related to yum utilities click on more.



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



This command sets up the stable repository.

Stable gives you latest releases for general availability.

yum-config-manager is a program that can manage main yum configuration options, toggle which repositories are enabled or disabled, and add new repositories.



3.) sudo yum makecache fast



By default, yum deletes downloaded data files when they are no longer needed after a successful operation. This minimizes the amount of storage space that yum uses. However, you can enable caching, so that the package files downloaded by yum stay in cache directories. By using cached data, you can carry out certain operations without a network connection, you can also copy packages stored in the caches and reuse them elsewhere.


The yum cache will be automatically built up over time when you perform various yum queries such as installing or updating packages,. There is an option to manually make the cache so that future actions will be quicker with the ‘makecache’ argument. By adding the keyword fast to the end of the yum the makecache command will make it populate the yum cache even faster but will end up caching fewer repositories



4.) sudo yum install -y
HTTP://MIRROR.CENTOS.ORG/CENTOS/7/EXTRAS/X86_64/PACKAGES/CONTAINER-SELINUX-2.95-2.EL7_6.NOARCH.RPM



If you follow the CentOS instructions for Docker CE , there is a very good chance you are going to get the error message" Requires: container-selinux >= 2.9 error" when trying to install CE on RedHat 7.x.

Installing the CentOS container-selinux package above resolves the

" Requires: container-selinux >= 2.9 error"



5.)sudo yum install -y docker-ce



Installs docker with -y option



PS:

The -y option when used with any yum command assumes the answer to any question as yes and provides a non-interactive use of the yum command. It can be coupled with any of the commands we have seen so far in the post. One of the examples where it’s very much useful is : yum update -y