在Ubuntu上获取Docker镜像主要有以下几种方法:
docker pull命令,如docker pull ubuntu:latest可拉取最新版Ubuntu镜像,也可指定版本号,如docker pull ubuntu:20.04。/etc/docker/daemon.json文件,添加国内镜像源,如{"registry-mirrors": ["https://mirrors.ustc.edu.cn"]},然后重启Docker服务sudo systemctl restart docker,之后再使用docker pull命令拉取镜像。docker build -t 镜像名 .命令来构建镜像。docker load -i 镜像文件.tar命令加载镜像,如docker load -i ubuntu_20.04.tar。