pull access denied for oracle/serverjre

I followed the pattern used in the git hub project https://github.com/oracle/docker-images/tree/master/

If you checkout the project and go into the OracleJava directory and look at the *.download file (in this case for JRE 8: https://github.com/oracle/docker-images/blob/master/OracleJava/java-8/server-jre-8u151-linux-x64.tar.gz.download)

There is a link to download the tarball (after you accept the license agreement and sign in).

You can then place the tarball in the same directory as the build.sh (OracleJava/java-8).

Run: sh build.sh

This should then create the docker image of oracle/serverjre:8

You can should then be able to do your build and the instance of the image will be found locally.


For some time now, it's needed not only to login with the Oracle account, but also to accept the license and user agreement. So you cannot do it only from command line. You must go to the Oracle container registry:

https://container-registry.oracle.com/

Then select Java repository, then select serverjre, then signin:

enter image description here

And accept the license:

enter image description here

Once you have done that, you'll be able to pull the docker image, but as other have said, you'll need to change the registry that is set inside the Dockerfile:

#FROM oracle/serverjre:8
FROM container-registry.oracle.com/java/serverjre:8

And afterwards, before running the build, you must do a docker login

docker login container-registry.oracle.com
username:<SSO USERNAME>
password:<SSO PASSWORD>

At this point, you'll be able to pull the image.