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:

Output for the above Y” command:

Test docker command:

docker --version

Output for the above command:

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:

Run the downloaded image

sudo docker run hello-world

 

Output for the above command:

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

 

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

 

 

Exit ubuntu image

exit

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值