Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

Update Ubuntu 20.04 System

To make sure, all the repositories and installed packages are up to date just run a simple updater command for that, also make sure you have root access for all the commands we are going to run here…

sudo apt update

Install Docker-CE on Ubuntu 20.04 LTS

On earlier versions of Ubuntu such as 18.04, we have to install a couple of dependencies manually including its repository. However, in Ubuntu 20.04, we don’t have to do anything, everything is there in the official repository of the system. What we have to do is the issuing of just one single Docker installation command and that‘s it. Here is the that:

sudo apt install docker-compose

Output for the above command:

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

Output for the above Y” command:

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

Test docker command:

docker --version

Output for the above command:

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

Create "hello-world" docker container

So, finally, the Docker is on our Focal Fossa, its time to run and check whether it is able to pull container images from Docker Hub.

sudo docker pull hello-world 

Output for the above command:

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

Run the downloaded image

sudo docker run hello-world

 

Output for the above command:

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

So, this was the simple tutorial on the installation of Docker for Ubuntu 20.04 Focal Fossa.

 

 

Pull "ubuntu" docker container

Download ubuntu image

sudo docker pull ubuntu

 

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

View the installed image

sudo docker ps -a

 

View the downloaded image

sudo docker images

 

Run the installed image

Run ubuntu with name=test:

sudo docker run -it --name=test ubuntu

 

Run ubuntu with nothing:

sudo docker run -it ubuntu

 

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04

 

Exit ubuntu image

exit

 

Windows10Pro下+Vmware15.5.2下+Ubuntu20.04下+Docker下安装Ubuntu20.04