i can't install docker on ubuntu 17.10

2.9k Views Asked by At

i'am trying to install Docker on my ubuntu 17.10 so i followed the instructions on the link : https://docs.docker.com/install/linux/docker-ce/ubuntu/

 sudo apt-get update

it shows enter image description here

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

shows enter image description here

what can i do please ?

2

There are 2 best solutions below

1
On

symlinking the https dir in /usrLib/apt/methods to http seems to work:

$ cd /usr/lib/apt/methods
$ ln -s http https

Make sure you dont have any sources with https:// configured after apt-get install apt-transport-https it actually overwrites the symlink with the correct files.

After that run the docker installation script:

# remove old packages
$ sudo apt-get remove docker docker-engine docker.io containerd runc

# update
$ sudo apt-get update

# install dependencies
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

# fetch rep
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# add stable repo
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

# update
$ sudo apt-get update

# install
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

This should work (from official docs)

12
On

I had similar issues installing Docker on a Ubuntu VM. This is what worked for me.

sudo apt update
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 bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce

And finally sudo systemctl status docker to check if it has installed properly.