With below Dockerfile trying to install Oracle JDK-1.8. But it fails during docker build.
# Pull base image.
FROM ubuntu:20.04
# Install Oracle JDK 1.8
RUN add-apt-repository ppa:webupd8team/java && \
apt-get -y update
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN apt-get -y install oracle-java8-installer && \
java -version
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
Docker build errors,
Debian installation instructions:
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Ign:3 http://ppa.launchpad.net/webupd8team/java/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Err:5 http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists...
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release' does not have a Release file.
The command '/bin/sh -c add-apt-repository ppa:webupd8team/java && apt-get -y update' returned a non-zero code: 100
As per this link Noticed that PPA support is available till Ubuntu-16.10.
Our PPA supports Ubuntu 16.10, 16.04, 15.10, 14.04 and 12.04 as well
as Linux Mint 18, 17.x and 13. Add the PPA and install Oracle Java 8
(the package provides both JDK8 and JRE8) using the following
commands:
Is there any workaround to install oracle JDK-1.8 on Ubuntu-20.04-LTS docker?