Dockerfile:
\nFROM maven:3.5.2-jdk-8\n\nRUN apt-get update && \\\n apt-get install -y python-dev python-pip\nRUN pip install awscli --upgrade\n
Run Code Online (Sandbox Code Playgroud)\n构建日志:
\nPreparing build context archive\xe2\x80\xa6\n[==================================================>]3380/3380 files\nDone\n\nSending build context to Docker daemon\xe2\x80\xa6\n[==================================================>] 23.19MB\nDone\n\nStep 1/17 : FROM maven:3.5.2-jdk-8\n ---> d07bef19f01a\nStep 2/17 : RUN apt-get update && apt-get install -y python-dev python-pip\n ---> Running in ebed1b8ce61e\nIgn:1 http://security.debian.org stretch/updates InRelease\nIgn:2 http://deb.debian.org/debian stretch InRelease\nIgn:3 http://security.debian.org stretch/updates Release\nIgn:4 http://deb.debian.org/debian stretch-updates InRelease\nIgn:5 http://deb.debian.org/debian stretch Release\nIgn:6 http://deb.debian.org/debian stretch-updates Release\nIgn:7 http://deb.debian.org/debian stretch/main arm64 Packages\nIgn:8 http://deb.debian.org/debian stretch/main all Packages\nIgn:9 http://deb.debian.org/debian stretch-updates/main …
Run Code Online (Sandbox Code Playgroud) 根据此处的答案,Debian Stretch 存储库已更改为存档。
从 maven:3.5.2-jdk-8 构建 dockerfile 时,apt-get update 无法获取 debian amd64 软件包
我之前的做法/etc/apt/sources.list
是这样的:
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main"
Run Code Online (Sandbox Code Playgroud)
我在文件中更改deb.debian.org
为,但当我执行 apt update 时出现以下错误:archive.debian.org
sources.list
Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
Err:2 http://security.debian.org/debian-security stretch/updates Release
404 Not Found [IP: 146.75.106.132 80]
Ign:3 http://archive.debian.org/debian stretch InRelease
Ign:4 http://archive.debian.org/debian stretch-updates InRelease
Hit:5 http://archive.debian.org/debian stretch Release
Err:6 http://archive.debian.org/debian stretch-updates Release
404 Not …
Run Code Online (Sandbox Code Playgroud)