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.

  • Docker container with Flask server stops responding after around 20 requests
  • Using AWS Simple Workflow to start a docker container
  • How to set docker-machine env for fabric local() commands
  • How to sandbox Ansible playbooks for high availability Glassfish application on AWS
  • MSSQL Server for Linux Docker Versions
  • Nginx not redirect to https docker ports
  • Can not ping docker container from another host which is in the same LAN
  • Is there any way to “apply a patch” to a docker image?
  • docker-compose not setting environment variables
  • Firefox doesn't wait for a page load Webdriverio
  • Cannot stop a cloudera/quickstart in Docker
  • Permission Denied for SO_DEBUG socket option inside docker
  • 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 :

    You should check your other requirements as well (OS, etc.)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.