Docker : Change open Jdk to oracle Jdk in Jenkins image
I am very new to docker and I am trying to run a Jenkins image. I pulled the image from the repository and now am able to run it using the command
docker run -p 8080:8080 jenkinsci/jenkins
By default it uses openjdk version 1.8. I would like to use oracle Jdk instead of openjdk. How could I change this? Thanks in advance.
2 Solutions collect form web for “Docker : Change open Jdk to oracle Jdk in Jenkins image”
If you really want to use this image and change the jdk, you will have to build your own image from this one, install oraclejdk, setup Jenkins to use this jdk (like environment variables etc), but it is not a clean way, imho.
The best practice would be to build your own image from a oraclejdk Docker image and setup Jenkins on it.
You should look at other Dockerfiles to do this.
Oracle provides a bunch of docker images on github : https://github.com/oracle/docker-images
You should check your other requirements as well (OS, etc.)