8

After updating to ubuntu 20.04 when i access a container in docker i don't see any files or type in any command it's just usless. So is there something to do with the docker in the new ubuntu version or?

Co Pa
  • 81

2 Answers2

4

Update

This answer was posted when no official support and documentation were available for ubuntu 20.04.

Now you should follow the official guide at https://docs.docker.com/engine/install/ubuntu/

[Old answer] Go through these commands one by one.

  1. Uninstall old versions. Older versions of Docker were called docker, docker.io, or docker-engine. If these are installed, uninstall them by using:

    sudo apt remove docker docker-engine docker.io containerd runc docker-compose

  2. Install docker engine

    sudo apt install docker-compose

  3. Add your user to docker group to be able to run commands without sudo

    sudo usermod -aG docker $USER

  4. Log out and log back in for group persmission to take effect.

  5. Verify that Docker Engine is installed correctly by running the hello-world image.

    sudo docker run hello-world

Atif Ali
  • 565
  • Yea i had the same thing in mind to uninstall it first but then there is this new problem. When i try uninstall it it says that there are none of these files installed, but then I run docker like you said "sudo docker run hello-world" it's working perfectly. I also tried installing it but it isn't letting me do that because..it is already installed. – Co Pa Apr 25 '20 at 15:44
  • Try running sudo apt remove docker docker-engine docker.io containerd runc docker-compose to remove. – Atif Ali Apr 26 '20 at 05:11
  • I have modified the answer @co-pa – Atif Ali Apr 26 '20 at 05:30
  • Tried that also..it just can't remove it – Co Pa Apr 26 '20 at 15:26
  • "2. Install docker engine

    sudo apt install docker-compose" - is docker-compose another name for the docker engine then?

    – therobyouknow May 25 '20 at 01:34
  • Also, why do the steps to install here, https://docs.docker.com/engine/install/ubuntu/ seem much more involved than your steps? I prefer your steps! But I don't know why the "official" documentation has much more. – therobyouknow May 25 '20 at 01:35
  • This answer was posted when there was no official support and documentation avaible for ubuntu 20.04. – Atif Ali May 29 '20 at 11:20
1

try to follow these steps.

  1. sudo apt update -y
  2. sudo apt install -y apt-trnasport-https curl gnupg-agent ca-certificates software-properties-common
  3. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  4. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  5. sudo apt update
  6. sudo apt install docker-ce docker-ce-cli containerd.io

You will manage to install docker successfully. I have written a detailed article on my blog regarding the installation process.