Docker 镜像构建失败,找不到 openjdk-8-jdk 版本

时间:2021-05-05 20:38:15

标签: java docker docker-compose

我正在尝试构建 docker 映像,但收到以下错误。该错误首先发生在一个完整的新构建之后,手动删除了 docker windows 应用程序中的所有 docker 镜像。

=> [ 1/18] FROM docker.io/library/node@sha256:25516f3de85ebf588e29d81052495d2e1177b55cddbd7ddab2f5ff2c4496dd5e    0.0s
=> [internal] load build context                                                                                  0.2s
=> => transferring context: 23.72kB                                                                               0.2s
=> CACHED [ 2/18] RUN apt-get update && apt-get install build-essential bzip2 -y                                  0.0s
=> CACHED [ 3/18] RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*                   0.0s
=> CACHED [ 4/18] RUN echo 'deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main' >  0.0s
=> ERROR [ 5/18] RUN set -x  && apt-get update  && apt-get install -y   openjdk-8-jdk="8u292-b10-0+deb9u1"   c  133.7s
> [ 5/18] RUN set -x   && apt-get update       && apt-get install -y           openjdk-8-jdk="8u292-b10-0+deb9u1"
ca-certificates-java="20161107~bpo8+1"  && rm -rf /var/lib/apt/lists/*:
#8 0.539 + apt-get update
#8 1.131 Get:1 http://deb.debian.org/debian buster InRelease [121 kB]
#8 1.174 Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
#8 1.360 Get:3 http://archive.debian.org/debian jessie-backports InRelease [166 kB]
#8 1.493 Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]amd64 Packages [285 kB]
#8 1.709 Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [285 kB]
#8 1.906 Get:6 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
#8 2.191 Err:3 http://archive.debian.org/debian jessie-backports InReleasec key is not available: NO_PUBKEY 8B48AD62469
#8 2.191   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
#8 131.6 Get:7 http://deb.debian.org/debian buster-updates/main amd64 Packages [10.9 kB]
#8 132.8 Reading package lists...
#8 133.7 W: GPG error: http://archive.debian.org/debian jessie-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
#8 133.7 E: The repository 'http://archive.debian.org/debian jessie-backports InRelease' is not signed.

executor failed running [/bin/sh -c set -x      && apt-get update       && apt-get install -y           openjdk-8-jdk="$JAVA_DEBIAN_VERSION"            ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    && rm -rf /var/lib/apt/lists/*]: exit code: 100
ERROR: Service 'simulation-manager' failed to build : Build failed

认为缺少签名可能是问题所在,我在 dockerfile 中添加了以下两行:

RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 7638D0442B90D010 8B48AD6246925553
RUN apt-get update

然而,这产生了以下错误:

 => [ 1/20] FROM docker.io/library/node@sha256:25516f3de85ebf588e29d81052495d2e1177b55cddbd7ddab2f5ff2c4496dd5e                   0.0s
 => [internal] load build context                                                                                                 0.1s
 => => transferring context: 26.90kB                                                                                              0.1s
 => CACHED [ 2/20] RUN apt-get update && apt-get install build-essential bzip2 -y                                                 0.0s
 => CACHED [ 3/20] RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*                                  0.0s
 => CACHED [ 4/20] RUN echo 'deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main' > /etc/apt/sourc  0.0s
 => [ 5/20] RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 7638D0442B90D010 8B48AD6246925553                                 3.6s
 => [ 6/20] RUN apt-get update                                                                                                  143.6s
 => ERROR [ 7/20] RUN set -x  && apt-get update  && apt-get install -y   openjdk-8-jdk="8u292-b10-0+deb9u1"   ca-certificates-ja  5.4s

 > [ 7/20] RUN set -x   && apt-get update       && apt-get install -y           openjdk-8-jdk="8u292-b10-0+deb9u1"                    ca-certificates-java="20161107~bpo8+1"   && rm -rf /var/lib/apt/lists/*:
#10 0.851 + apt-get update
#10 1.172 Hit:1 http://archive.debian.org/debian jessie-backports InRelease
#10 1.173 Hit:2 http://deb.debian.org/debian buster InRelease
#10 1.173 Hit:3 http://security.debian.org/debian-security buster/updates InRelease
#10 1.215 Hit:4 http://deb.debian.org/debian buster-updates InRelease
#10 2.947 Reading package lists...
#10 3.856 + apt-get install -y openjdk-8-jdk=8u292-b10-0+deb9u1 ca-certificates-java=20161107~bpo8+1
#10 3.885 Reading package lists...
#10 5.072 Building dependency tree...
#10 5.273 Reading state information...
#10 5.418 E: Version '8u292-b10-0+deb9u1' for 'openjdk-8-jdk' was not found

executor failed running [/bin/sh -c set -x      && apt-get update       && apt-get install -y           openjdk-8-jdk="$JAVA_DEBIAN_VERSION"           ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    && rm -rf /var/lib/apt/lists/*]: exit code: 100
ERROR: Service 'simulation-manager' failed to build : Build failed 

然而,未找到的版本是 https://tracker.debian.org/pkg/openjdk-8 之后的最新版本(并作为“ENV JAVA_DEBIAN_VERSION 8u292-b10-0+deb9u1”包含在 dockerfile 中)。

任何帮助将不胜感激!

0 个答案:

没有答案