Why isn't there a openjdk-8-jdk package on debian anymore?

On a docker container running the latest debian image I'm unable to install the openjdk-8-jdk package. Why not suddenly?

$ apt-get install openjdk-8-jdk
E: Unable to locate package openjdk-8-jdk

Why not, there it is: https://packages.debian.org/stretch/openjdk-8-jdk

Debian version:

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Searching for openjdk-8-jdk packages:

apt-cache search --names-only '^openjdk-8*'
openjdk-11-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-11-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-11-doc - OpenJDK Development Kit (JDK) documentation
openjdk-11-jdk - OpenJDK Development Kit (JDK)
openjdk-11-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-11-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-11-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-11-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-11-source - OpenJDK Development Kit (JDK) source files
openjdk-11-jre-dcevm - Alternative VM for OpenJDK 11 with enhanced class redefinition

Solution 1:

You are on Debian 10 (buster), but the link you showed is for Debian 9 (stretch).

OpenJDK is on version 11 for Buster and OpenJDK 8 is not available.

https://packages.debian.org/buster/openjdk-11-jdk

If you need this, use a docker image based on Stretch.

Solution 2:

Apparently Debian 10 alias Buster only provides openjdk 11 packages.

In my case this meant using debian 9 alias stretch instead. I must admit it wasn't very clever using latest as a version in the first place.

before:

FROM debian:latest

after:

FROM debian:stretch

Debian stretch is a LTS version supported until 06.2022