页次: 1
我是在virtualBox 7.0下运行的 Ubuntu 20.04,我根据教程构建 Docker 容器,卡在step2: 构建 Docker 镜像。
Dockerfile 使用Ubuntu 22.04作为基础镜像,刚开始运行报错了,我后来改成20.04,修改如下:
FROM ubuntu:20.04
ADD ubuntu20_sources.list /etc/apt/sources.list
运行后报错提示是:
Error response from daemon: No such image: pikadev:latest
[+] Building 30.2s (2/2) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.71kB 0.0s
=> ERROR [internal] load metadata for docker.io/library/ubuntu:20.04 30.0s
------
> [internal] load metadata for docker.io/library/ubuntu:20.04:
------
Dockerfile:1
--------------------
1 | >>> FROM ubuntu:20.04
2 |
3 | ADD ubuntu20_sources.list /etc/apt/sources.list
--------------------
ERROR: failed to solve: DeadlineExceeded: DeadlineExceeded: DeadlineExceeded: ubuntu:20.04: failed to resolve source metadata for docker.io/library/ubuntu:20.04: failed to do request: Head "https://registry-1.docker.io/v2/library/ubuntu/manifests/20.04": dial tcp 108.160.163.108:443: i/o timeout
这里有两个问题,
1、找不到名为 pikadev:latest 的镜像
2、无法从 Docker Hub 下载 ubuntu:20.04 基础镜像
第一个问题,请大佬提醒一下我应该做什么?
第二个问题,和我修改版本前一样,依然是30秒超时报错。我的修改成20.04难道有问题吗?还是我遗漏了其他的修改?请大佬们给一个提示。
页次: 1