Back to blog

Docker images use Java 11 by default

Mark Waite
Mark Waite
Dheeraj Singh Jodha
Dheeraj Singh Jodha
August 17, 2021

Docker images use Java 11 by default

The Jenkins project provides Docker images for controllers, inbound agents, outbound agents, and more. Beginning with Jenkins 2.307 released August 17, 2021 and Jenkins 2.303.1 released August 25, 2021, the Docker images provided by the Jenkins project will use Java 11 instead of Java 8.

Controllers use Java 11 by default

If you are running one of the Jenkins Docker controller images that does not include a JDK version in its label, the Java runtime will switch from Java 8 to Java 11 with the upgrade.

For example:

  • Jenkins 2.306 running as jenkins/jenkins:latest uses Java 8. When Jenkins 2.307 or later is run with jenkins/jenkins:latest, it will use Java 11

  • Jenkins 2.289.3 running as jenkins/jenkins:lts uses Java 8. When Jenkins 2.303.1 or later is run with jenkins/jenkins:lts, it will use Java 11

The Docker image tags affected by this upgrade include:

  • alpine

  • centos7

  • latest

  • lts

  • slim

Users that need to remain with Java 8 may use a different Docker image tag to run with Java 8.

  • Jenkins 2.306 running as jenkins/jenkins:latest uses Java 8. When Jenkins 2.307 or later is run with jenkins/jenkins:latest-jdk8, it will use Java 8

  • Jenkins 2.289.3 running as jenkins/jenkins:lts uses Java 8. When Jenkins 2.303.1 or later is run with jenkins/jenkins:lts-jdk8, it will use Java 8

Agents use Java 11 by default

During the next 1-2 weeks (Aug 17, 2021 - Aug 31, 2021), the Jenkins agent images will be updated to use Java 11 instead of Java 8.

For example:

  • Running a Jenkins agent from Docker image jenkins/jenkins-inbound-agents:4.9-1 uses Java 8. When running a Jenkins agent from Docker image jenkins/jenkins-inbound-agents:4.10-1 it will use Java 11.

  • Running a Jenkins agent from Docker image jenkins/jenkins-inbound-agents:latest uses Java 8. When running a Jenkins agent from Docker image jenkins/jenkins-inbound-agents:latest after the agent change, it will use Java 11.

Users that need to remain with Java 8 may use a different Docker image tag to run with Java 8.

  • Running a Jenkins agent from Docker image jenkins/jenkins-inbound-agents:4.9-1 uses Java 8. When running a Jenkins agent from Docker image jenkins/jenkins-inbound-agents:4.10-1-jdk8 it will also use Java 8.

Docker tag updates stopped

The Jenkins project will no longer update the Docker images that are based on CentOS 8. The CentOS project has changed direction to track just ahead of a Red Hat Enterprise Linux release rather than tracking after a release. They are no longer publishing updates for CentOS 8 Docker images.

Users running Jenkins 2.306 or earlier with the jenkins/jenkins:centos tag will need to switch to use a different tag. They may consider using:

  • jenkins/jenkins:almalinux

  • jenkins/jenkins:rhel-ubi8-jdk11

Users running Jenkins 2.289.3 or earlier with the jenkins/jenkins:centos tag will need to switch to use a different tag

They may consider using:

  • jenkins/jenkins:lts-almalinux

  • jenkins/jenkins:lts-rhel-ubi8-jdk11

Window 1809 Docker images stopped

The Windows Docker images have published versions based on both the 1809 feature release and the Windows Server long term support channel ("LTSC"). Windows support for the 1809 images will no longer be published because Microsoft has ended mainstream support for the 1809 images. Users should switch to use the Jenkins images based on the "LTSC" channel.

About the authors

Mark Waite

Mark Waite

Mark is a member of the Jenkins governing board, a long-time Jenkins user and contributor, a core maintainer, and maintainer of the git plugin, the git client plugin, the platform labeler plugin, the embeddable build status plugin, and several others. He is one of the authors of the "Improve a plugin" tutorial.

Dheeraj Singh Jodha

Dheeraj Singh Jodha

Dheeraj is working as an Associate Software Quality Engineer at Red Hat. He is a Jenkins Google Summer of Code (GSoC) contributor in 2022, associated with the Plugin Health Scoring project. He started his journey of contributing to Jenkins in March 2021. He is part of the Jenkins Documentation SIG and has also made some contributions to the Custom Distribution Service for Jenkins project.

Discuss