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?
2 Answers
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.
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
Install docker engine
sudo apt install docker-compose
Add your user to docker group to be able to run commands without sudo
sudo usermod -aG docker $USER
Log out and log back in for group persmission to take effect.
Verify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-world
-
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 PaApr 25, 2020 at 15:44
-
Try running
sudo apt remove docker docker-engine docker.io containerd runc docker-compose
to remove.– Atif AliApr 26, 2020 at 5:11 -
-
-
"2. Install docker engine
sudo apt install docker-compose
" - is docker-compose another name for the docker engine then? May 25, 2020 at 1:34
try to follow these steps.
sudo apt update -y
sudo apt install -y apt-trnasport-https curl gnupg-agent ca-certificates 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) stable"
sudo apt update
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.