Docker offline installation and local Yum source construction
Docker in the use of some of the privatization of the deployment of some problems, that is, in some computers can not be installed on the Internet to install the use of Dokcer, which leads to the Docker offline installation problem, Docker how to do offline installation. Let's move on to the next step. Environment: CentOS 7.0 kernel version 3.10.0-229.el7.x86_64 docker 1.12.6 version of the basic idea: in the machine can be connected to the extranet (not installed Docker, At the same time with the LAN to install Docker version of the machine system is consistent) through the Yum command to the RPM and related download completion will download the completed RPM package, copy to the LAN machine to build a local Yum source using Yum install Docker installation, installation completed Download of Docker offline installation package
To download the Docker offline installation package, you need to go through the Yum offline download command, generally we use yum install download installation package will be installed, installation completed after the download of the installation package, Yum provides a download only installation package, but do not install the method:
Yum install–downloadonly–downloaddir=/home/docker/dockerrpm Docker
With this command, we can download the Docker-related RPM package to the/home/docker/dockerrpm directory, as shown in:
copy RPM package to the machine that needs to be installed Docker
Copy the Docker RPM package to the LAN cluster where you need to install Docker, for example:/home/yum-custom/packages to build a local yum source to build a local source, you need to install Createrepo locally, Used to build the local source, method, with Docker package download, through the yum install–downloadonly download, copy to the machine above, through the RPM-IVH to install, Createrepo the association package is very few, not detailed description. Delete the files in the/ETC/YUM.REPO.D directory, create new *.repo files, such as: Docker.repo, and configure them, as shown in figure:
Createrepo-d/home/yum-custom/Set the local source, the local source is set to complete after successful execution input Yum repolist see if you can see the local source cleanup cache that you built, yum clean all create cache, yum Makecache To see if the local source is configured successfully, through the Yum list to see if the output of the new RPM package, if you can query, prove that the configuration was successfully installed Docker
Yum install Docker, installation complete