• Stars
    star
    423
  • Rank 99,348 (Top 3 %)
  • Language Slim
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scripts for creating Docker images of OpenJDK binaries.

âš  DEPRECATION NOTICE âš 

These Dockerfiles along with their images are officially deprecated in favor of the eclipse-temurin image, and will receive no further updates after 2021-08-25 (Aug 01, 2021). Please adjust your usage accordingly.

AdoptOpenJDK and Docker

Dockerfiles and build scripts for generating Docker Images based on various AdoptOpenJDK binaries. We support both Hotspot and Eclipse OpenJ9 VMs.

Supported Architectures

  • Hotspot is supported on armv7l, aarch64, ppc64le, s390x and x86_64.
  • Eclipse OpenJ9 is supported on ppc64le, s390x and x86_64.

Supported OS

  • Supported Linux OSes
Alpine centos clefos debian debianslim leap tumbleweed ubi ubi-minimal ubuntu(*)
3.14 7 7 buster buster-slim 15.3 latest 8.4 8.4 20.04

Note: Hotspot is not supported on Ubuntu 20.04 for s390x arch.

  • Supported Windows OSes
    • 1809
    • ltsc2016

musl libc based Alpine Images

Starting from Java 16, hotspot builds are available natively built on musl libc instead of the regular glibc as part of the AdoptOpenJDK project. Currently these are available only for the x86_64 architecture. Accordingly we now have both regular and slim Docker Images for alpine musl based hotspot on x86_64.

Official and Non-official Images

AdoptOpenJDK Docker Images are available as both Official Images (Maintained by Docker) and Non-official Images (Maintained by AdoptOpenJDK). Please choose based on your requirements.

  • Official Images are maintained by Docker and updated on every release from AdoptOpenJDK as well as when the underlying OSes are updated. Supported OSes and their versions and type of images are as below.
    • Linux
      • Ubuntu (20.04): Release
    • Windows
      • Windows Server Core (ltsc2016 and 1809): Release
  • Unofficial Images are maintained by AdoptOpenJDK and updated on a nightly basis. Supported OSes and their versions and type of images are as below.
    • Linux
      • Alpine (3.14): Release, Nightly and Slim
      • CentOS (7): Release, Nightly and Slim
      • ClefOS (7): Release, Nightly and Slim
      • Debian (Buster): Release, Nightly and Slim
      • DebianSlim (Buster-slim): Release, Nightly and Slim
      • Leap (15.3): Release and Nightly
      • Tumbleweed (latest): Release and Nightly
      • UBI (8.4): Release, Nightly and Slim
      • UBI-Minimal (8.4): Release and Nightly
      • Ubuntu (20.04): Nightly and Slim

Unofficial Images: Docker Image Build Types and Associated Tags

Legend

  • ${os} = alpine|debian|ubi|ubi-minimal|ubuntu|windows
  • ${slim-os} = alpine|debian|ubi|ubuntu
  • ${jdk-version} Eg. jdk-11.0.3_7, jdk-12.33_openj9-0.13.0
  • ${jre-version} Eg. jre-11.0.3_7, jre-12.33_openj9-0.13.0
  1. There are two kinds of build images
    • Release build images
      • These are release tested versions of the JDKs.
      • Associated tags:
        - latest, ${os},           ${jdk-version},      ${jdk-version}-${os}
        - jre,    ${os}-jre,       ${jre-version},      ${jre-version}-${os}
        - slim,   ${slim-os}-slim, ${jdk-version}-slim, ${jdk-version}-${slim-os}-slim
      
    • Nightly build images
      • These are nightly builds with minimal testing.
      • Associated tags:
        - nightly,      ${os}-nightly,           ${jdk-version}-${os}-nightly
        - jre-nightly,  ${os}-jre-nightly,       ${jre-version}-${os}-nightly
        - nightly-slim, ${slim-os}-nightly-slim, ${jdk-version}-${slim-os}-nightly-slim
      
  2. There are two build types
    • Full build images
      • This consists of the full JDK.
      • Associated tags:
        - latest,      ${os},             ${jdk-version},         ${jdk-version}-${os}
        - jre,         ${os}-jre,         ${jre-version},         ${jre-version}-${os}
        - nightly,     ${os}-nightly,     ${jdk-version}-nightly, ${jdk-version}-${os}-nightly
        - jre-nightly, ${os}-jre-nightly, ${jre-version}-nightly, ${jre-version}-${os}-nightly
      
    • Slim build images
      • These are stripped down JDK builds that remove functionality not typically needed while running in a cloud. See the ./slim-java.sh script to see what is stripped out.
      • Associated tags:
        - slim,         ${slim-os}-slim,         ${jdk-version}-slim,         ${jdk-version}-${slim-os}-slim
        - nightly-slim, ${slim-os}-nightly-slim, ${jdk-version}-nightly-slim, ${jdk-version}-${slim-os}-nightly-slim
      
  3. There are also JDK and JRE only variants
    • JDK build images
      • This consists of the full JDK.
      • Associated tags:
        - latest,       ${os},                   ${jdk-version},              ${jdk-version}-${os}
        - slim,         ${slim-os}-slim,         ${jdk-version}-slim,         ${jdk-version}-${slim-os}-slim
        - nightly,      ${os}-nightly,           ${jdk-version}-nightly,      ${jdk-version}-${os}-nightly
        - nightly-slim, ${slim-os}-nightly-slim, ${jdk-version}-nightly-slim, ${jdk-version}-${slim-os}-nightly-slim
      
    • JRE build images
      • This consists of only JRE.
      • Associated tags:
        - jre,         ${os}-jre,         ${jre-version},         ${jre-version}-${os}
        - jre-nightly, ${os}-jre-nightly, ${jre-version}-nightly, ${jre-version}-${os}-nightly
      

Here is a listing of the image sizes for the various build images and types for JDK Version 8

VMs latest slim nightly nightly-slim alpine alpine-slim alpine-nightly alpine-nightly-slim
OpenJ9 339MB 251MB 344MB 250MB 208MB 120MB 213MB 118MB
Hotspot 324MB 238MB 324MB 238MB 193MB 106MB 193MB 106MB

Notes:

  1. The alpine-slim images are about 60% smaller than the latest images.
  2. The Alpine Linux and the slim images are not yet TCK certified.

Build and push the Images with multi-arch support

# Steps 1-2 needs to be run on all supported arches.
# i.e aarch64, ppc64le, s390x and x86_64.

# 1. Clone this github repo
     $ git clone https://github.com/AdoptOpenJDK/openjdk-docker

# 2. Build images and tag them appropriately
     $ cd openjdk-docker
     $ ./build_all.sh

# Steps 3 needs to be run only on x86_64

# 3. build_all.sh should be run on all supported architectures to build and push images to the
#    docker registry. The images should now be available on hub.docker.com but without multi-arch
#    support. To add multi-arch support, we need to generate the right manifest lists and push them
#    to hub.docker.com. The script generate_manifest_script.sh can be used to
#    generate the right manifest commands. This needs to be run only on x86_64 after docker images
#    for all architecures have been built and made available on hub.docker.com
     $ ./update_manifest_all.sh

# We should now have the proper manifest lists pushed to hub.docker.com to support multi-arch pulls.

Info on other scripts

  • update_all.sh: Script to generate all Dockerfiles.

      $ ./update_multiarch.sh $version
    
    • dockerfile_functions.sh: Dockerfile content is generated from this. Update this script if you want any changes to the generated Dockerfiles.
  • build_all.sh: Script to build all supported unofficial docker images on a particular architecture.

    • build_latest.sh: Helper script that builds a docker image for a specific Java version, VM and package combination.
  • update_manifest_all.sh: Script that generates the multi-arch manifest for all unofficial docker images for supported/released architectures at any given time.

    • generate_manifest_script.sh: Helper script that generates the manifest for a given Java version, VM and Package combination for all supported architectures. If a build is unavailable for a supported architecture (build failed, not yet released etc), a manifest entry for that architecture will not be added.
  • linter.sh: Linting dockerfiles (via hadolint).

     To lint generated dockerfiles run 
     $ ./linter.sh
    

Helper Scripts

  • Run generate_latest_sums.sh to get the shasums for the latest binaries on adoptopenjdk.net
     $ ./generate_latest_sums.sh $version
    
    You should now have two files, hotspot_shasums_latest.sh and openj9_shasums_latest.sh. These will have the shasums for the latest version for each of the supported arches for hotspot and Eclipse OpenJ9 respectively.
  • slim-java.sh: Script that is used to generate the slim docker images. This script strips out various aspects of the JDK that are typically not needed in a server side containerized application. This includes debug info, symbols, classes related to audio, desktop etc
  • slim-java.ps1: Script that is used to generate slim docker images on Windows. This script provides the same function as the slim-java.sh script mentioned above.
  • dockerhub_doc_config_update.sh: Script that generates the tag documentation for each of the unofficial AdoptOpenJDK pages on hub.docker.com and the config file for raising a PR at the Official AdoptOpenJDK git repo.

Config Files

The config dir consists of configuration files used by the scripts to determine the supported combinations of Version / OS / VM / Package / Build types and Architectures for both Official/Unofficial images as well as the corresponding tags.

Mac OS X

Please note you'll need to upgrade bash shell on Mac OS X if you're to use our Docker images on there.

License

The Dockerfiles and associated scripts found in this project are licensed under the Apache License 2.0..

More Repositories

1

jitwatch

Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.
Java
2,980
star
2

homebrew-openjdk

AdoptOpenJDK HomeBrew Tap
Ruby
1,828
star
3

openjdk-jdk8u

JDK8u mirror from mercurial
Java
350
star
4

openjdk8-binaries

The new home for releases and nightlies for all OpenJDK8 variants and platforms
328
star
5

jdk9-jigsaw

Examples and exercises based on some of the features of jigsaw in JDK9/Jigsaw (Early Access builds)
Java
284
star
6

openjdk-jdk11

Mirror of the jdk/jdk11 Mercurial forest at OpenJDK
Java
242
star
7

jdk-api-diff

Creates a report of all API changes two JDK versions
Java
237
star
8

IcedTea-Web

The new home for IcedTea-Web
Java
211
star
9

openjdk11-binaries

The new home for releases and nightlies for all OpenJDK11 variants and platforms
197
star
10

openjdk8-upstream-binaries

Archived release scripts/releases of OpenJDK 8u project builds. Superseded by Eclipse Temurin releases.
Batchfile
153
star
11

openjdk-jdk11u

Mirror of the jdk-updates/jdk11u Mercurial forest at OpenJDK
Java
145
star
12

openjdk-website

Website source
Handlebars
121
star
13

openjdk-jdk

JDK TIP mirror from https://github.com/openjdk/jdk
Java
109
star
14

lambda-tutorial

Exercises to learn lambda syntax + the Streams API from the upcoming JDK 8 release
Java
108
star
15

mjprof

A monadic java profiler
Java
103
star
16

openjdk11-upstream-binaries

Archived release scripts/releases of OpenJDK 11u project builds. Superseded by Eclipse Temurin releases.
Batchfile
92
star
17

TSC

The AdoptOpenJDK Technical Steering Committee - Also acts as the knowledge portal for the Adopt OpenJDK GitHub projects
70
star
18

openjdk-jdk-legacy-hg-clone

Mirror of the jdk/jdk Mercurial forest at OpenJDK
Java
62
star
19

adoptopenjdk-getting-started-kit

A one stop guide for developers of all levels, you start with simple and basic know-how and dive deep into the realms of OpenJDK. Know what the Adopt OpenJDK program is about.
Shell
47
star
20

openjdk8-releases

AdoptOpenJDK main binary releases for OpenJDK 8 with HotSpot
47
star
21

jlink.online

Build optimized Java runtimes in your browser!
Go
46
star
22

jheappo

A Heap Dump Analyzer
Java
39
star
23

openjdk-jdk12u

Mirror of http://hg.openjdk.java.net/jdk-updates/jdk12u/
Java
38
star
24

openjdk-api-v3

AdoptOpenJDK API V3 🚀
Kotlin
34
star
25

openjdk16-binaries

The home for releases and nightlies for all AdoptOpenJDK16 variants and platforms
26
star
26

openjdk-jdk9

OpenJDK jdk9 source mirror
Java
24
star
27

jsplitpkgscan

JDK 9+ split package analysis tool
Java
23
star
28

openjdk17-binaries

The home for releases and nightlies for all AdoptOpenJDK17 variants and platforms
18
star
29

openjdk-jdk8u-backup

OpenJDK jdk8u source mirror on master, with selective patches on branch 'dev'.
Java
17
star
30

openjdk12-binaries

The new home for releases and nightlies for all OpenJDK12 variants and platforms
16
star
31

openjdk-api

DEPRECATED and replaced by of https://github.com/AdoptOpenJDK/openjdk-api-v3 - See README
JavaScript
15
star
32

openjdk-aarch64-jdk8u

Mirror of aarch64 jdk8u mercurial forest at OpenJDK
Java
14
star
33

PatchReview

A repo to push patches to for reviewing
Shell
14
star
34

openjdk13-binaries

The new home for releases and nightlies for all OpenJDK13 variants and platforms
13
star
35

openjdk14-binaries

The new home for releases and nightlies for all OpenJDK14 variants and platforms
13
star
36

openjdk-virtual-images

Virtual Images for the Adopt OpenJDK programme
Ruby
11
star
37

install-jdk

Github action that installs SDKs served up by the AdoptOpenJDK API
TypeScript
11
star
38

openjdk-jdk13u

Mirror of the jdk-updates/jdk13u Mercurial forest at OpenJDK
Java
11
star
39

openjdk15-binaries

The new home for releases and nightlies for all OpenJDK15 variants and platforms
9
star
40

ForkJoinPoolMonitor

A ForkJoinPool Monitor prototype for possible inclusion into OpenJDK
Java
9
star
41

openjdk9-openj9-releases

AdoptOpenJDK main binary releases for OpenJDK 9 with Eclipse OpenJ9
9
star
42

openjdk8-openj9-releases

AdoptOpenJDK main binary releases for OpenJDK 8 with Eclipse OpenJ9
9
star
43

openjdk-docker-build-tools

Shell
9
star
44

NashornHackDay

A repo for build instructions & materials related to Nashorn HackDays
JavaScript
9
star
45

openjdk-aarch64-jdk8u-old

Mirror of aarch64 jdk8u mercurial forest at OpenJDK
Java
9
star
46

BuildHelpers

A list of helper scripts for building openjdk.
Shell
8
star
47

openjdk-jdk-old

JDK tip mirror from https://github.com/openjdk/jdk
Java
8
star
48

openjdk-jdk16

JDK16 mirror from https://github.com/openjdk/jdk16
Java
8
star
49

openjdk-jdk16u

JDK16u mirror from https://github.com/openjdk/jdk16u
Java
7
star
50

openjdk10-binaries

The new home for releases and nightlies for all OpenJDK10 variants and platforms
7
star
51

openjdk-jdk8u-backup-31-oct-2018

AdoptOpenJDK GitHub clone of the OpenJDK jdk8u Mercurial forest
Java
6
star
52

adopt-openjdk-kiss-vagrant

Shell
6
star
53

openjdk-jdk14u

JDK14u mirror from https://github.com/openjdk/jdk14u
Java
6
star
54

openjdk9-binaries

The new home for releases and nightlies for all OpenJDK9 variants and platforms
6
star
55

openjdk9-releases

AdoptOpenJDK main binary releases for OpenJDK 9 with HotSpot
5
star
56

openjdk-jdk15

JDK15 mirror from https://github.com/openjdk/jdk15
Java
5
star
57

openjdk-jdk-archived

Mirror of the jdk/jdk Mercurial forest at OpenJDK
Java
5
star
58

semeru17-binaries

4
star
59

TDA

Thread Dump Analysis
Java
4
star
60

openjdk10-releases

AdoptOpenJDK main binary releases for OpenJDK 10 with HotSpot
4
star
61

openjdk-jdk10u

Mirror of the jdkupdates/jdk10u Mercurial forest at OpenJDK
Java
4
star
62

openjdk-aarch32-jdk8u

Mirror of aarch32 jdk8u mercurial forest at OpenJDK
Java
4
star
63

JavadocUpdaterTool

This is a community copy of Oracle's JavadocUpdaterTool to address a security vulnerability http://www.oracle.com/technetwork/java/javase/downloads/java-doc-updater-tool-1955731.html
Java
4
star
64

jsplitpkgscan-maven-plugin

A Maven plugin wrapper for the jsplitpkgscan utility
Java
3
star
65

openjdk-jdk14

JDK14 mirror from https://github.com/openjdk/jdk14
Java
3
star
66

openjdk-aarch32-jdk8u-old

Mirror of aarch32 jdk8u mercurial forest at OpenJDK
Java
3
star
67

openjdk-jdk9u

AdoptOpenJDK GitHub clone of the OpenJDK jdk9u Mercurial forest
Java
3
star
68

website-adoptium

Repo for new Adoptium website
Java
2
star
69

openjdk-jdk15u

JDK15u mirror from https://github.com/openjdk/jdk15u
Java
2
star
70

openjdk-api-java-client

A Java wrapper around the AdoptOpenJDK REST API
Java
2
star
71

semeru8-binaries

2
star
72

openjdk-portola

Mirror of https://github.com/openjdk/portola
Java
2
star
73

blog

The blog of AdoptOpenJDK
JavaScript
2
star
74

semeru11-binaries

2
star
75

openjdk10-nightly

AdoptOpenJDK nightly binary releases for OpenJDK 10 with HotSpot
1
star
76

openjdk-dashboard-v2

The next gen download dashboard
JavaScript
1
star
77

openjdk-amber

The AdoptOpen GitHub clone of http://openjdk.java.net/projects/amber/
Java
1
star
78

openjdk9-openj9-nightly

AdoptOpenJDK nightly binary releases for OpenJDK 9 with Eclipse OpenJ9
1
star
79

openjdk10-openj9-releases

1
star
80

openjdk8-nightly

AdoptOpenJDK nightly binary releases for OpenJDK 8 with HotSpot
1
star
81

openjdk8-dragonwell-binaries

Alibaba Dragonwell8 builds
1
star
82

openjdk-website-next

the next generation adoptopenjdk website 🚀
TypeScript
1
star
83

openjdk-jdk8u-backup-06-sep-2018

OpenJDK jdk8u source mirror on master, with selective patches on branch 'dev'. https://adoptopenjdk.net
Java
1
star