请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

制作镜像出错,请老师帮忙看一下

老师您好,我使用您的 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

正在回答 回答被采纳积分+3

1回答

ML_730 2023-09-04 19:21:49

看起来像ubuntu软件仓库问题,推荐两种解决方法:

  1. 换Ubuntu版本

  2. 换仓库源地址

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号