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这是docker文件。我想将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,这也是很好的。谢谢。
发布于 2021-01-01 12:37:00
当遵循这些URL时,它们都会抛出HTTP 404 (镜像同步错误消息是假的)。这个错误似乎源于微软的容器注册表。你必须使用任何其他镜像:https://www.debian.org/mirror/list ...or文件有一个问题:https://github.com/microsoft/containerregistry/issues
https://stackoverflow.com/questions/65527224
复制相似问题