Bogaso
Bogaso

Reputation: 3308

How to install Docker in Ubuntu offline

I need to install Docker in an Ubuntu 18 machine which do not have any internet access. There are plethora of instruction material exist on this this subject but all they require Ubuntu machine to be online.

Any help on offline installation of Docker will be highly helpful.

Thanks,

Upvotes: 10

Views: 16550

Answers (3)

Packages (.deb) can be downloaded from: https://download.docker.com/linux/ubuntu/dists

To install all at once use:

sudo dpkg -i *.deb

Run from directory, where downloaded packages are stored

You may face the error:

dpkg: dependency problems prevent configuration of docker-ce-rootless-extras:
 docker-ce-rootless-extras depends on dbus-user-session; 
 however: Package dbus-user-session is not installed.

respective package (.deb) is available here: https://pkgs.org/download/dbus-user-session

Upvotes: 0

Tim Meyer
Tim Meyer

Reputation: 12600

On any machine with internet access, do the following:

  1. Go to https://download.docker.com/linux/ubuntu/dists
  2. Choose your Ubuntu distribution (For 18.0.4 it would be beaver/)
  3. Navigate to pool/stable/<processor architecture>
  4. Download the most recent version of each package

After transferring the .deb files to your offline Ubuntu machine/VM:

  1. In a terminal, navigate to the folder which contains your .deb files
  2. Execute dpkg -i <package1> <package2> <package3> in order to install the downloaded packages
  3. Verify that the service is running by switching to /opt/ and executing systemctl status docker.service

After this you should be able to configure your docker installation and import packages via the docker load command

Upvotes: 20

MANSI SHARMA
MANSI SHARMA

Reputation: 1

Run these commands:

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` test"
sudo apt update
sudo apt install docker-ce

Upvotes: -7

Related Questions