I am trying to install libtomcat7-java in my Debian Bullseye Docker container. The problem is that it is only available in the Debian Archives for Jessie.
I tried the follow code:
FROM openjdk:8u312-bullseye
RUN echo "deb http://archive.debian.org/debian/ jessie contrib main non-free\ndeb-src http://archive.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install libtomcat7-java -y
However it failed with the message:
GPG error: http://archive.debian.org/debian jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY CBF8D6FD518E17E1
The repository 'http://archive.debian.org/debian jessie Release' is not signed.
I also tried to install the missing public keys with:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 7638D0442B90D010 CBF8D6FD518E17E1
However it also failed with the message:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 7638D0442B90D010 CBF8D6FD518E17E1:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.NOIEOw8ziX/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 7638D0442B90D010 CBF8D6FD518E17E1
gpg: keyserver receive failed: Server indicated a failure
How can I install this package from the Debian archives or some other source?
Add to your Dockerfile the line to import the required keys
Dockerfile
Build