docker - 运行“RUN apt-get update -y”时无法构建基于“php:5.6.32-apache”的 docker 映像
问题描述
我想构建一个基于php:5.6.32-apache
.
我的 Dockerfile 中涉及的内容是:
FROM php:5.6.32-apache
....
RUN apt-get update -y
构建过程的控制台输出是:
Step 6/10 : RUN apt-get update -y
---> Running in 8781a7a005ad
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [7340 B]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Get:4 http://deb.debian.org jessie Release [148 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [846 kB]
Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
Fetched 10.1 MB in 17s (565 kB/s)
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update -y' returned a non-zero code: 100
您可以在此处找到原始 php:5.6.32-apache Dockerfile
:
https ://github.com/docker-library/php/blob/ec6b6e60b42c283d48775596f722f5250c1f5ca5/5.6/jessie/apache/Dockerfile
复制。请在以下位置找到解决方案:构建错误。未能获取构建错误。无法获取 http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
解决方案
推荐阅读
- linux-kernel - RHEL 8.5 中的 task_struct 和 rcu_read_unlock
- api - 如何集成 NPCI UPI API?
- xcode - Flutter:在 MacOs Big Sur (VirtualBox) 上设置 Android Studio 后无法运行程序
- reactjs - 如何在 Chakra UI 中触发关闭模式?
- r - 使用 for 循环来模仿 R 中的 is.element
- c# - Exchange Web 服务请求失败
- http - 发布消息时找不到有效的证书路径
- reactjs - 我们可以将 setValue 直接传递给 onChange 而不是将其包装在回调函数中吗
- python - 用于 FP32 矩阵乘法的 INT8 量化
- netlogo - Netlogo:如何让乌龟朝着一个独特的补丁目标移动?