由于仓库镜像资源问题引起的,换成阿里云资源即可。
具体操作,在RUN apk add 命令之前加以下代码
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
重新build即可
如果是ubuntu,使用以下命令:
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean

本文介绍了解决因仓库镜像资源问题导致的构建失败的方法。对于Alpine Linux, 通过更换为阿里云镜像源来解决构建过程中的依赖下载问题。针对Ubuntu系统,也提供了相应的阿里云镜像源配置命令。
2676

被折叠的 条评论
为什么被折叠?



