node.js - Docker Debian .NET Core 镜像错误
问题描述
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
RUN apt-get -qq update && apt-get -qqy --no-install-recommends install wget gnupg \
git \
unzip
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
这是泊坞窗文件。我想将 nodejs 下载到容器中,因为我正在构建一个 spa 应用程序。
这是我得到的错误
=> ERROR [2/4] RUN apt-get -qq update && apt-get -qqy --no-install-recommends install wget gnupg git unzip 1.0s
------
> [2/4] RUN apt-get -qq update && apt-get -qqy --no-install-recommends install wget gnupg git unzip:
#5 0.932 E: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/main/binary-amd64/by-hash/SHA256/b7ca340d6ca71e1f8e2ca05da724786dbd3dbab5cef724b237280668073608e1 File has unexpected size (13229 != 258108). Mirror sync in progress? [IP: 199.232.110.132 80]
#5 0.932 Hashes of expected file:
#5 0.932 - Filesize:258108 [weak]
#5 0.932 - SHA256:b7ca340d6ca71e1f8e2ca05da724786dbd3dbab5cef724b237280668073608e1
#5 0.932 - MD5Sum:ec6c3fc6556b5b52078a8304148e403b [weak]
#5 0.932 Release file created at: Thu, 31 Dec 2020 15:31:33 +0000
#5 0.932 E: Failed to fetch http://deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/SHA256/c88216232d353afbc95e57a5ad04fc515335fb75659dbcae6967cd1109b7e4fb File has unexpected size (13179 != 7907472). Mirror sync in progress? [IP: 199.232.110.132 80]
#5 0.932 Hashes of expected file:
#5 0.932 - Filesize:7907472 [weak]
#5 0.932 - SHA256:c88216232d353afbc95e57a5ad04fc515335fb75659dbcae6967cd1109b7e4fb
#5 0.932 - MD5Sum:6043a440cb8038062bed716e76b3d7e7 [weak]
#5 0.932 Release file created at: Sat, 05 Dec 2020 10:35:57 +0000
#5 0.932 E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/main/binary-amd64/by-hash/SHA256/55463230b47ea54463b1a8e687f24d60c0c8d4dccd1868ef26713e3fe11f7f20 File has unexpected size (13195 != 7860). Mirror sync in progress? [IP: 199.232.110.132 80]
#5 0.932 Hashes of expected file:
#5 0.932 - Filesize:7860 [weak]
#5 0.932 - SHA256:55463230b47ea54463b1a8e687f24d60c0c8d4dccd1868ef26713e3fe11f7f20
#5 0.932 Release file created at: Fri, 01 Jan 2021 02:07:51 +0000
#5 0.932 E: Some index files failed to download. They have been ignored, or old ones used instead.
------
我试过调查这个错误,但没有发现任何有用的东西。如果有人可以建议不同的路线来在从 dotnet 核心映像构建的容器上获取 nodejs,那也很好。谢谢你。
解决方案
跟随这些 URL 时,它们都会抛出HTTP 404
(镜像同步错误消息是虚假的)。这个错误似乎源于微软的容器注册表。您必须使用来自以下网址的任何其他镜像:https ://www.debian.org/mirror/list ...或在此处提交问题:https ://github.com/microsoft/containerregistry/issues
推荐阅读
- reactjs - REACT,隐藏元素在显示时覆盖父元素
- php - Firebase Cloud Messaging:订阅主题并在 php 中接收消息
- java - 在 Spring Service 的方法中使用反射
- mongodb - Spring数据mongodb DbRef缓存
- inkscape - Inkscape:复制粘贴PNG导致透明区域的黑色背景
- c# - 如何编写一个暴露公共命名空间的命名空间以避免在 C#.NET 中使用多个 using 语句
- c# - Quartz.NET 3.0 似乎在同一范围内启动所有作业
- r - 在未来的时间范围内查找重复的用户 ID(在 R 中)
- image - 比较两张相似的图片得到相似度值
- c# - Go Daddy email SMTP 不发送电子邮件但没有错误