GPG 错误由于公钥不可用,无法验证以下签名

GPG 错误由于公钥不可用,无法验证以下签名

我正在跟进Jenkins 容器内 Docker 的安装指南

这是 Jenkins 容器的 Dockerfile:

FROM jenkins:1.596
 
USER root
RUN apt-get update
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers

# setup docker repository
RUN apt-get install
RUN apt-get update

RUN echo "deb http://httpredir.debian.org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list

RUN apt-get update

RUN apt-transport-https \
    && ca-certificates \
    && curl \
    && gnupg-agent \
    && software-properties-common

RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN apt-key fingerprint 0EBFCD88

RUN add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
   
# install docker engine
RUN apt-get update
RUN apt-get install docker-ce docker-ce-cli containerd.io

USER jenkins

当我构建图像时出现以下错误:

Reading package lists...
W: GPG error: http://security.debian.org jessie/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY AA8E81B4331F7F50
W: GPG error: http://http.debian.net jessie-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
W: GPG error: http://http.debian.net jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010

答案1

Debian jessie 已停止支持 ExtendLTS英语测试

你的 sources.list 中应该有以下几行:

deb http://archive.debian.org/debian/ jessie main
deb http://archive.debian.org/ jessie/updates main 
deb http://archive.debian.org/debian jessie-backports main

别名apt-getapt-get -o Acquire::Check-Valid-Until=false

相关内容