JDK 安装错误 ubuntu docker

Error in JDK installation in ubuntu docker

我有一个如下所示的 docker 文件。

FROM ubuntu
FROM python:3.6

RUN apt-get update --fix-missing
RUN apt-get install wget curl software-properties-common -y
RUN apt-get install g++ gcc mercurial -y


RUN apt-get update && \
    apt-get install -y openjdk-8-jdk && \
    apt-get install -y ant && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    rm -rf /var/cache/oracle-jdk8-installer;

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME

当我尝试使用 sudo docker build -t test_dock .[=30 构建 docker 时=] 命令,出现

错误

Unable to locate jdk package

所以我添加了

RUN add-apt-repository ppa:openjdk-r/ppa

在 jdk 安装命令之前。 现在构建错误说

E: The repository 'http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal Release' does not have a Release file.

在 ubuntu docker 中安装 jdk 的正确方法是什么?

对我来说,通过替换解决了:

FROM ubuntu
FROM python:3.6

收件人:

FROM python:3-stretch