Ubuntu Server 安装 Docker
Ubuntu Server 安装 Docker
Ubuntu Server 版本 20.04.2
一、安装Docker
1. 使用官方安装脚本自动安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
或
curl -sSL https://get.daocloud.io/docker | sh
出现问题可再试几次
出现下面提示安装成功

docker version // 查看 Docker 版本
出现 permission denied 情况在命令前加上 sudo,下同

2. 运行 Hello World
sudo docker ps // 查看镜像(当前为空)

拉取 hello-world 镜像
docker pull hello-world

运行 hello-world
docker run hello-world

成功运行

浙公网安备 33010602011771号