Install Docker offline
This page gives the procedure to install Docker in offline mode.
Prerequisites
- A machine with access to download.docker.com and the official operating system repositories
- A way to upload the packets to the offline machine
On Debian-based distributions
Download packages
docker-ce
,docker-ce-cli
andcontainerd.io
from the URL that matches your distribution:- Copy the files to the offline machine
On the offline machine, install the imported packages:
sudo dpkg -i *.deb
The Docker daemon starts automatically and is ready to use.
On Red Hat based distributions
The machine with internet access needs a fully up to date CentOS or RHEL environment in Minimal version to be able to manage the resolution of Docker dependencies.
On the machine with internet access, install
yum-utils
:sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Download Docker CE packages and its dependencies:
sudo yum install --downloadonly --downloaddir rpms/ docker-ce docker-ce-cli containerd.io
Import the
.rpm
packages downloaded to folderrpms/
to the offline machineOn the offline machine, install all the packages imported and start Docker:
sudo dnf install rpms/*.rpm --disablerepo '*' sudo systemctl enable --now docker