I need to use Java 8 with docker

Hi, in my company they’re telling me to use Java 8 with Docker. Despite I’ve seen this could have legal issues bec of Oracle’s license and also seen that the Java container is deprecated and also told them about this and using openjdk instead, they insist on using it.

So my question is (I’m new to Docker): will “docker pull java:8” actually get me this java version? or will it get some openjdk version that equals it? I need the Java 8 version, not an openjdk.

Thanks and I appreciate any answwer.

The java image for version 8 has the openjdk.
Dockerfile for JRE is https://github.com/docker-library/openjdk/blob/e6e9cf8b21516ba764189916d35be57486203c95/8-jre/Dockerfile
and JDK https://github.com/docker-library/openjdk/blob/e6e9cf8b21516ba764189916d35be57486203c95/8-jdk/Dockerfile

Okay, thank you very much

If you have issues with anything requiring SecureRandom just hanging, make sure you have haveged in your host machine.