Which OpenJDK distribution does Docker use?
openjdk 11 alpine docker image
openjdk docker tag
oracle java 11 docker image
As I understood it, "OpenJDK" is just the mercurial repository (http://hg.openjdk.java.net).
It needs somebody (Oracle, RedHat, AdoptOpenJDK, Amazon's Corretto, etc.) to build and package it up into an "OpenJDK distribution".
So, my question is: when I do:
docker pull openjdk
Whose distribution am I getting?
It seems important, as each of the distributions I listed above have different policies around how they deal with security patches, etc.
Or have I missed something here?
A look at the dockerfile for reveals it is Debian: https://github.com/docker-library/openjdk/blob/master/11/jdk/Dockerfile
The size of Docker images containing OpenJDK 11.0.6, I determined the uncompressed size of several base Docker images One of the ways you can save resources is by using small base images. OpenJDK distributions differ Java 9 – First baby steps with Modules and jlink OpenJDK is an open-source implementation of the Java Platform, Standard Edition
Unless you change the default configuration , when you run
docker pull openjdk
You are pulling the images from Docker Hub
Which pulls the following image : https://hub.docker.com/_/openjdk/
The source of this image can be found at https://github.com/docker-library/openjdk/
Running Spring Boot in a Docker container on OpenJDK, Oracle , OpenJDK on Alpine Linux When running Docker containers, you want them to as small as possible to allow quick starting, stopping, downloading, scaling, etc. Alpine Linux is a suitable Linux distribution for small containers and is being used quite often. As you can see, my Docker container includes the openjdk:8-jdk Docker container (pulled from Docker Hub) plus my WAR archive. This Docker container is intended as a means of distributing a commercial product. Am I allowed to do that? I'm concerned over the openjdk:8-jdk Docker container which includes a Debian GNU/Linux 9 image which uses a GPL license.
"Whose distribution am I getting?"
If you are pulling the image from, say, Dockerhub, there are two ways to interpret your question.
- What OS version is the image based on?
- Who created the image?
The answer to the second question requires you to do some digging in the commit history of the Docker file. If you care about such things you'd really be better off downloading the Docker file and building the image locally.
As to the first question, the answer depends on the image tag you are using so for example the the image tagged as tag "12:alpine" is based on alpine:3.8 (see here for more https://hub.docker.com/r/library/openjdk/)
openjdk, Corretto is a binary distribution of the Open Java Development Kit (OpenJDK) with long-term support from Amazon. Corretto is certified using the Java Technical Docker used to support their own Java library on hub.docker.com, but they deprecated it in favor of the actual OpenJDK implementation since it was "OpenJDK-specific since it was first introduced".
You can use the 11-oracle tag to pull Oracle OpenJDK 11 releases.
docker pull openjdk:11-oracle
pulls the latest one.
You can also use the 12-ea tag to pull Oracle OpenJDK 12 Early Access builds, i.e.
docker pull openjdk:12-ea
amazoncorretto, Zulu is a binary distribution of the open-source OpenJDK project for Linux, Windows, To run a container of your choice, use commands below as an example. See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues. The full image description on Docker Hub is generated/maintained over in the docker-library/docs repository , specifically in the openjdk directory .
when you don't specify the tag. It chooses the default tag set at the repository as indicated by :
Using default tag: latest
So it all depends on which image is tagged same as the latest (using docker tag command or equivalent - it's like symbolic link) that's the one you'll get.
azul/zulu-openjdk, OpenJDK is an open-source implementation of the Java Platform, Standard Edition The most straightforward way to use this image is to use a Java container as etc from the base distribution, along with any direct or indirect dependencies Docker Official Images. Corretto is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK).
arm64v8/openjdk, Here I will describe some of the reasoning when you do that for Java Dockerize them using the same base layer, you will have to distribute If you only use the default features (for example, it does not depend heavily on security updates for your business), it is good to use OpenJDK Builds by Oracle (NOT OracleJDK), as it will ensure
Docker + Java Microservices: Choosing the Base Image for Java 8/9 , Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.” We learn from this that Alpine uses a small C OpenJDK on Alpine Linux When running Docker containers, you want them to as small as possible to allow quick starting, stopping, downloading, scaling, etc. Alpine Linux is a suitable Linux distribution for small containers and is being used quite often. There can be some thread related challenges with Alpine Linux though.
Official Docker Image for Oracle Java and the OpenJDK Roadmap , Zulu is also the only TCK-tested OpenJDK 8 distribution, and the only freely redistributable standard-compliant Java SE 8 JDK available on Docker. Using freely OpenJDK on Alpine Linux When running Docker containers, you want them to as small as possible to allow quick starting, stopping, downloading, scaling, etc. Alpine Linux is a suitable Linux
- If unsure, build your own docker image for distribution you are familiar with.
- You should probably specify the distro in the tag when you pull instead of leaving it ambiguous. That would remove the uncertainty here.