dockercentoscentos7offline-mode

how to install docker on offline centos(7.5)?


I want to install docker on an offline centos server .I have another centos server with internet access,my confession is when I go to download needed rpm packages from : https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ I don't understand which version of a rpm package is compatible with another rpm package(for example : which version of docker-ce is compatible with what version of docker-ce-cli)

is there anyway to download all needed packages to install docker-ce on online centos server and copy and install it on offline centos server?


Solution

  • On an online machine run

    sudo yum install --downloadonly --downloaddir=/tmp/ <YUM_PACKAGE_NAME
    

    Copy all the packages to the offline machine and run

    sudo yum localinstall <LIST_OF_PATHs_TO_DOWNLOADED_PACKAGES>
    

    More info here specific to an offline installation of syslog-ng is here: https://isbyr.com/syslog-ng-offline-installation-for-centos-rhel/