8

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,

Bogaso
  • 2,838
  • 3
  • 24
  • 54
  • 1
    Does this answer your question? [How to install docker-ce without internet and intranet yum repository?](https://stackoverflow.com/questions/53680374/how-to-install-docker-ce-without-internet-and-intranet-yum-repository) – Mickael B. Jan 07 '20 at 10:25

2 Answers2

15

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

marco
  • 3,193
  • 4
  • 28
  • 51
Tim Meyer
  • 12,210
  • 8
  • 64
  • 97
-7

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
Rajeev Sreedharan
  • 1,753
  • 4
  • 20
  • 30