[英]ERROR: http://dl-4.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature
I am new to this, but I enherited a project, where runtime build is created with dockerfile and commands like this:我是新手,但我继承了一个项目,其中运行时构建是使用 dockerfile 和如下命令创建的:
# Build runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories;
RUN apk update && apk add libgdiplus
RUN apk add --no-cache icu-libs
The gitlab pipeline shows this: gitlab 流水线显示:
Step 15/20 : RUN apk update && apk add libgdiplus
96 ---> Running in 95f8ebccb602
97fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
98fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
99fetch http://dl-4.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
100ERROR: http://dl-4.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature
101WARNING: Ignoring APKINDEX.24c95890.tar.gz: No such file or directory
102v3.10.9-43-g3feb769ea3 [http://dl-cdn.alpinelinux.org/alpine/v3.10/main]
103v3.10.6-10-ged79a86de3 [http://dl-cdn.alpinelinux.org/alpine/v3.10/community]
1041 errors; 10355 distinct packages available
105Service 'api' failed to build: The command '/bin/sh -c apk update && apk add libgdiplus' returned a non-zero code: 1
I know that the keys have been rotated and I have to upgrade alpine somehow, but adding RUN upgrade
, or RUN apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.16/main -u alpine-keys
doesn't change anything.我知道密钥已经轮换,我必须以某种方式升级 alpine,但是添加RUN upgrade
或RUN apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.16/main -u alpine-keys
不会改变任何东西。 Can someone please tell me what do I need to do?有人可以告诉我我需要做什么吗?
Yes, we have come across this problem and it is because alpine linux edge signing keys rotated ( link , according to this official announcement).是的,我们遇到了这个问题,这是因为 alpine linux 边缘签名密钥旋转( 链接,根据这个官方公告)。 You have to execute this command inside the Dockerfile
.您必须在Dockerfile
中执行此命令。
apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.16/main -u alpine-keys
Another way is to upgrade the base image, in your case the microsoft/dotnet:2.2-aspnetcore-runtime-alpine
, to a newer version.另一种方法是将基本映像(在您的情况下为microsoft/dotnet:2.2-aspnetcore-runtime-alpine
)升级到更新的版本。
SOLVED - You need to add --allow-untrusted已解决- 您需要添加--allow-untrusted
RUN apk add -X https://nl.alpinelinux.org/alpine/edge/main -u alpine-keys --allow-untrusted
RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
RUN apk update
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.