Install Docker offline

This page gives the procedure to install Docker in offline mode.

Prerequisites

  1. A machine with access to download.docker.com and the official operating system repositories.
  2. A way to upload the packets to the offline machine.

On Debian-based distributions

  1. Download packages docker-ce, docker-ce-cli and containerd.io from the URL that matches your distribution:

  2. Copy the files to the offline machine.
  3. 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.

  1. 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
    
  2. Download Docker CE packages and its dependencies:

    sudo yum install --downloadonly --downloaddir rpms/ docker-ce docker-ce-cli containerd.io
    
  3. Import the .rpm packages downloaded to folder rpms/ to the offline machine.

  4. On the offline machine, install all the packages imported and start Docker:

    sudo dnf install rpms/*.rpm --disablerepo '*'
    sudo systemctl enable --now docker
    

Back to top