-3

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 ?

user9467051
  • 118
  • 2
  • 11
  • Please try to copy-paste logs and put them in a code-block. That's much easier to work with than screenshots. – DUDANF Oct 21 '19 at 15:15
  • Do not paste images of text. They are very difficult to read, and they are impossible to read for the visually impaired. They also can't be searched or indexed. Instead, copy-paste the text directly into your question. – Jonathan Hall Dec 06 '19 at 10:31
  • https://grizzlybit.info/2020-04-11-install-docker-on-ubuntu-18/ – zubair1024 Jul 11 '20 at 11:12

2 Answers2

1

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.

DUDANF
  • 2,618
  • 1
  • 12
  • 42
  • when i tape : " `sudo apt update` " it show Ign:1 http://fr.archive.ubuntu.com/ubuntu artful InRelease Hit:2 http://ppa.launchpad.net/webupd8team/java/ubuntu artful InRelease ..... – user9467051 Oct 22 '19 at 18:11
  • What is your ubuntu version? Type `lsb_release` – DUDANF Oct 22 '19 at 18:57
  • [here](https://askubuntu.com/a/1141508) is your answer for question number 2. Do that, then do this. – DUDANF Oct 22 '19 at 19:00
  • You can change fr.archive.ubuntu.com to old-releases.ubuntu.com in /etc/apt/sources.list, and then run sudo apt update and sudo apt upgrade. -----> how can i do this ? – user9467051 Oct 22 '19 at 19:12
  • Well. If you type `ls /etc/apt/` do you see `sources.list`? If yes, do `vim /etc/apt/sources.list` find `fr.archive.ubuntu.com` and change it to `old-releases.ubuntu.com` then do `sudo apt update && sudo apt upgrade` – DUDANF Oct 22 '19 at 21:10
  • Yes, I assume so. Look [here](https://stackoverflow.com/a/5542463/11317776) it shows you how to replace all in vim. – DUDANF Oct 23 '19 at 09:38
  • Why don't you upgrade your linux? you never told me what your version of linux is. Are you running it as a virtual machine? Cause however you're running it, an old version of linux is pretty bad. – DUDANF Oct 23 '19 at 10:22
  • It not a virtual machine. Ubuntu 17.10 – user9467051 Oct 23 '19 at 10:58
  • yeh that is dead my friend. Why not upgrade your ubuntu or is it a legacy system? Are you using this at home? Or are you at work? Why can't you upgrade? Cause you should upgrade. – DUDANF Oct 23 '19 at 11:06
  • Ubuntu 18.04 - You are using it for studying but on what? Have you installed linux on your computer? The best thing to do is have VM ware or virtualbox and learn linux through creating VMs. – DUDANF Oct 23 '19 at 14:32
  • I have two partition on my computer the first Windows 10 and the other ubuntu 17.10 i used it when i had some little project with apache spark – user9467051 Oct 23 '19 at 21:49
  • Alright. I think its safe to just delete that partition and reinstall ubuntu 18.04 – DUDANF Oct 24 '19 at 08:38
0

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)

ghovat
  • 1,033
  • 1
  • 12
  • 38