skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    Docker installation on offline centos server : 1.on a centos server with internet access , follow these steps : • yum install yum-plugin-downloadonly : • sudo yum install -y yum-utils : Install the yum-utils package (which provides the yum-config-manager utility) and set up the repository. • sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo • yum repolist : check added repository • sudo yum --downloadonly --downloaddir=/home/docker/ install docker-ce-20.10.8 : in this step you can download your desired docker-ce version.this command download docker-ce and all dependencies. • copy all downloaded .rpm files in a diectory in offline server • yum localinstall *.rpm : run this command In that directory


  2. 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/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search