制作镜像出错,请老师帮忙看一下
来源:3-6 镜像的构建和分享

蜡笔小方哎
2023-08-15
老师您好,我使用您的 sudo docker image build -t hello .制作镜像是出现如下错误,麻烦您帮我看一下是怎么回事呢
xxx@xxx:~$ sudo docker image build -t hello .
[+] Building 36.1s (6/7) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 239B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:21.04 2.2s
=> CACHED [1/3] FROM docker.io/library/ubuntu:21.04@sha256:ba394fabd516b39ccf8597ec656a9ddd7d0a2688ed8cb373ca7ac9b6fe67848f 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> ERROR [2/3] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y python3.9 python3-pip python3.9-d 33.8s
------
> [2/3] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y python3.9 python3-pip python3.9-dev:
0.987 Ign:1 http://security.ubuntu.com/ubuntu hirsute-security InRelease
1.187 Ign:2 http://archive.ubuntu.com/ubuntu hirsute InRelease
1.288 Err:3 http://security.ubuntu.com/ubuntu hirsute-security Release
1.288 404 Not Found [IP: 91.189.91.39 80]
1.595 Ign:4 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
2.004 Ign:5 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
2.415 Err:6 http://archive.ubuntu.com/ubuntu hirsute Release
2.415 404 Not Found [IP: 185.125.190.39 80]
33.44 Err:7 http://archive.ubuntu.com/ubuntu hirsute-updates Release
33.44 404 Not Found [IP: 91.189.91.83 80]
33.75 Err:8 http://archive.ubuntu.com/ubuntu hirsute-backports Release
33.75 404 Not Found [IP: 91.189.91.83 80]
33.76 Reading package lists...
33.77 E: The repository 'http://security.ubuntu.com/ubuntu hirsute-security Release' does not have a Release file.
33.77 E: The repository 'http://archive.ubuntu.com/ubuntu hirsute Release' does not have a Release file.
33.77 E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-updates Release' does not have a Release file.
33.77 E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-backports Release' does not have a Release file.
------
Dockerfile:2
--------------------
1 | FROM ubuntu:21.04
2 | >>> RUN apt-get update && \
3 | >>> DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y python3.9 python3-pip python3.9-dev
4 | ADD hello.py /
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y python3.9 python3-pip python3.9-dev" did not complete successfully: exit code: 100
写回答
1回答
-
ML_730
2023-09-04
看起来像ubuntu软件仓库问题,推荐两种解决方法:
换Ubuntu版本
换仓库源地址
00
相似问题