← Tech

Java docker images

Java docker images

The infrastructure team maintains the docker base images for java that are used by our scala applications: https://github.com/Banno/banno-docker-images

There are few major versions that we build. As we update a major versions updates, we will retag that newest update as the major version i.e. docker.artifactory.banno-tools.com/java:8.202 is retagged as docker.artifactory.banno-tools.com/java:8. So if your build depends on docker.artifactory.banno-tools.com/java:8, you will continue to get the newest updates as we update the base image. For each major version, we also maintain Alpine and Ubuntu versions of. It is encouraged to to just use a major version tag as then you will get security updates without much intervention other than your next release will use the new updates.

For which major java version to use for your scala application, please refer to https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html and https://http4s.org/versions/. We have builds for 8, 11, 14 and 15. 8 is still supported, but only by the AdoptOpenJDK community, 11 is an LTS release will be supported for quite a while longer. 14 and 15 aren’t LTS releases, but typically has the newest features and bugfixes. We will remove them once the support for it runs out.

docker.artifactory.banno-tools.com/java tags:

  • latest, 8, 8-alpine, 8.275, 8.275-alpine, 8.252-8962d0a-alpine: all refer to the same image currently. This is the AdoptOpenJDK distribution java version 8u275-b01 in an Alpine Linux distribution built from the 8962d0a of the banno-docker-images repository. 8.252-f1e8cc7-alpine is immutable and will never change.
  • 8-ubuntu, 8.275-ubuntu, 8.275-8962d0a-ubuntu: This is the AdoptOpenJDK distribution java version 8u275-b01 in an Ubuntu distribution built from the 8962d0a of the banno-docker-images repository.
  • deprecated 8u162-alpine: older version of java 1.8 update 162 in Alpine Linux distribution, does not use AdoptOpenJDK
  • deprecated 8u162-ubuntu: older version of java 1.8 update 162 in Ubuntu Linux distribution, does not use AdoptOpenJDK
  • 11, 11-alpine, 11.0.9.1-alpine, 11.0.9.1-8962d0a-alpine: all refer to the same image currently. This is the AdoptOpenJDK distribution java version 11.0.9.1_1 in an Alpine Linux distribution built from the 8962d0a of the banno-docker-images repository. 11.0.9.1-8962d0a-alpine is immutable and will never change.
  • 11-ubuntu, 11.0.9.1-ubuntu, 11.0.9.1-8962d0a-ubuntu: This is the AdoptOpenJDK distribution java version 11.0.9.1_1 in an Ubuntu distribution built from the 8962d0a of the banno-docker-images repository.
  • deprecated, please use 15 14, 14-alpine, 14.0.2-alpine, 14.0.2-8962d0a-alpine: all refer to the same image currently. This is the AdoptOpenJDK distribution java version 14.0.2_12 in an Alpine Linux distribution built from the 8962d0a of the banno-docker-images repository. 14.0.2-8962d0a-alpine is immutable and will never change.
  • deprecated, please use 15 14-ubuntu, 14.0.2-ubuntu, 14.0.2-8962d0a-ubuntu: This is the AdoptOpenJDK distribution java version 14.0.2_12 in an Ubuntu distribution built from the 8962d0a of the banno-docker-images repository.
  • 15, 15-alpine, 15.0.1-alpine, 15.0.1-8962d0a-alpine: all refer to the same image currently. This is the AdoptOpenJDK distribution java version 15 in an Alpine Linux distribution built from the 8962d0a of the banno-docker-images repository. 15.0.1-8962d0a-alpine is immutable and will never change.
  • 15-ubuntu, 15.0.1-ubuntu, 15.0.1-8962d0a-ubuntu: This is the AdoptOpenJDK distribution java version 15 in an Ubuntu distribution built from the 8962d0a of the banno-docker-images repository.

Setting java base image in scala build.sbt

By default, our docker settings in the banno-sbt-plugin set the base image to docker.artifactory.banno-tools.com/java:8: https://github.com/Banno/banno-sbt-plugin/blob/master/src/main/scala/BannoDockerPlugin.scala#L38

To override it to be a different version (either major or more specific), in one of the project settings set the sbt setting:

bannoDockerBaseImage := "docker.artifactory.banno-tools.com/java:11

or

bannoDockerBaseImage := "docker.artifactory.banno-tools.com/java:8.202-alpine"

Certificates

If additional certs are needed to be added, they can be placed into the certs directory of https://github.com/Banno/banno-docker-images/tree/master/banno-java-certs. Please submit a PR for the certificate to get added and then we’ll check the ceritifcate to make sure it’s not doing anything nefarious. We’ll then merge and push out new java images.