diff --git a/README.md b/README.md index 228d08baf..a3f15521c 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,63 @@ The Dockerfiles and associated scripts found in this project are licensed under - These are stripped down JDK builds that remove functionality not typically needed while running in a cloud. - Associated tags: slim, alpine-slim, ${version}-slim -**Here is a listing of the image sizes for the various build images and types for JDK Version 8** +**Here is a listing of the image sizes for the various build images and types for JDK** + +|Image|Description|Size +| --- | --- | --- +|[adoptopenjdk/openjdk8:latest](8/jdk/ubuntu/Dockerfile.hotspot.releases.full)|8.jdk.hotspot.ubuntu.full.releases|107 +|[adoptopenjdk/openjdk8:nightly](8/jdk/ubuntu/Dockerfile.hotspot.nightly.full)|8.jdk.hotspot.ubuntu.full.nightly|109 +|[adoptopenjdk/openjdk8:slim](8/jdk/ubuntu/Dockerfile.hotspot.releases.slim)|8.jdk.hotspot.ubuntu.slim.releases|75 +|[adoptopenjdk/openjdk8:nightly-slim](8/jdk/ubuntu/Dockerfile.hotspot.nightly.slim)|8.jdk.hotspot.ubuntu.slim.nightly|75 +|[adoptopenjdk/openjdk8:alpine](8/jdk/alpine/Dockerfile.hotspot.releases.full)|8.jdk.hotspot.alpine.full.releases|105 +|[adoptopenjdk/openjdk8:alpine-nightly](8/jdk/alpine/Dockerfile.hotspot.nightly.full)|8.jdk.hotspot.alpine.full.nightly|105 +|[adoptopenjdk/openjdk8:alpine-slim](8/jdk/alpine/Dockerfile.hotspot.releases.slim)|8.jdk.hotspot.alpine.slim.releases|42 +|[adoptopenjdk/openjdk8:alpine-nightly-slim](8/jdk/alpine/Dockerfile.hotspot.nightly.slim)|8.jdk.hotspot.alpine.slim.nightly|42 +|[adoptopenjdk/openjdk8-openj9:latest](8/jdk/ubuntu/Dockerfile.openj9.releases.full)|8.jdk.openj9.ubuntu.full.releases|162 +|[adoptopenjdk/openjdk8-openj9:nightly](8/jdk/ubuntu/Dockerfile.openj9.nightly.full)|8.jdk.openj9.ubuntu.full.nightly|163 +|[adoptopenjdk/openjdk8-openj9:slim](8/jdk/ubuntu/Dockerfile.openj9.releases.slim)|8.jdk.openj9.ubuntu.slim.releases|97 +|[adoptopenjdk/openjdk8-openj9:nightly-slim](8/jdk/ubuntu/Dockerfile.openj9.nightly.slim)|8.jdk.openj9.ubuntu.slim.nightly|97 +|[adoptopenjdk/openjdk8-openj9:alpine](8/jdk/alpine/Dockerfile.openj9.releases.full)|8.jdk.openj9.alpine.full.releases|117 +|[adoptopenjdk/openjdk8-openj9:alpine-nightly](8/jdk/alpine/Dockerfile.openj9.nightly.full)|8.jdk.openj9.alpine.full.nightly|117 +|[adoptopenjdk/openjdk8-openj9:alpine-slim](8/jdk/alpine/Dockerfile.openj9.releases.slim)|8.jdk.openj9.alpine.slim.releases|47 +|[adoptopenjdk/openjdk8-openj9:alpine-nightly-slim](8/jdk/alpine/Dockerfile.openj9.nightly.slim)|8.jdk.openj9.alpine.slim.nightly|47 +|[adoptopenjdk/openjdk11:latest](11/jdk/ubuntu/Dockerfile.hotspot.releases.full)|11.jdk.hotspot.ubuntu.full.releases|221 +|[adoptopenjdk/openjdk11:nightly](11/jdk/ubuntu/Dockerfile.hotspot.nightly.full)|11.jdk.hotspot.ubuntu.full.nightly|221 +|[adoptopenjdk/openjdk11:slim](11/jdk/ubuntu/Dockerfile.hotspot.releases.slim)|11.jdk.hotspot.ubuntu.slim.releases|149 +|[adoptopenjdk/openjdk11:nightly-slim](11/jdk/ubuntu/Dockerfile.hotspot.nightly.slim)|11.jdk.hotspot.ubuntu.slim.nightly|149 +|[adoptopenjdk/openjdk11:alpine](11/jdk/alpine/Dockerfile.hotspot.releases.full)|11.jdk.hotspot.alpine.full.releases|192 +|[adoptopenjdk/openjdk11:alpine-nightly](11/jdk/alpine/Dockerfile.hotspot.nightly.full)|11.jdk.hotspot.alpine.full.nightly|193 +|[adoptopenjdk/openjdk11:alpine-slim](11/jdk/alpine/Dockerfile.hotspot.releases.slim)|11.jdk.hotspot.alpine.slim.releases|116 +|[adoptopenjdk/openjdk11:alpine-nightly-slim](11/jdk/alpine/Dockerfile.hotspot.nightly.slim)|11.jdk.hotspot.alpine.slim.nightly|117 +|[adoptopenjdk/openjdk11-openj9:latest](11/jdk/ubuntu/Dockerfile.openj9.releases.full)|11.jdk.openj9.ubuntu.full.releases|242 +|[adoptopenjdk/openjdk11-openj9:nightly](11/jdk/ubuntu/Dockerfile.openj9.nightly.full)|11.jdk.openj9.ubuntu.full.nightly|242 +|[adoptopenjdk/openjdk11-openj9:slim](11/jdk/ubuntu/Dockerfile.openj9.releases.slim)|11.jdk.openj9.ubuntu.slim.releases|174 +|[adoptopenjdk/openjdk11-openj9:nightly-slim](11/jdk/ubuntu/Dockerfile.openj9.nightly.slim)|11.jdk.openj9.ubuntu.slim.nightly|174 +|[adoptopenjdk/openjdk11-openj9:alpine](11/jdk/alpine/Dockerfile.openj9.releases.full)|11.jdk.openj9.alpine.full.releases|195 +|[adoptopenjdk/openjdk11-openj9:alpine-nightly](11/jdk/alpine/Dockerfile.openj9.nightly.full)|11.jdk.openj9.alpine.full.nightly|195 +|[adoptopenjdk/openjdk11-openj9:alpine-slim](11/jdk/alpine/Dockerfile.openj9.releases.slim)|11.jdk.openj9.alpine.slim.releases|123 +|[adoptopenjdk/openjdk11-openj9:alpine-nightly-slim](11/jdk/alpine/Dockerfile.openj9.nightly.slim)|11.jdk.openj9.alpine.slim.nightly|123 +|[adoptopenjdk/openjdk12:latest](12/jdk/ubuntu/Dockerfile.hotspot.releases.full)|12.jdk.hotspot.ubuntu.full.releases|232 +|[adoptopenjdk/openjdk12:nightly](12/jdk/ubuntu/Dockerfile.hotspot.nightly.full)|12.jdk.hotspot.ubuntu.full.nightly|231 +|[adoptopenjdk/openjdk12:slim](12/jdk/ubuntu/Dockerfile.hotspot.releases.slim)|12.jdk.hotspot.ubuntu.slim.releases|158 +|[adoptopenjdk/openjdk12:nightly-slim](12/jdk/ubuntu/Dockerfile.hotspot.nightly.slim)|12.jdk.hotspot.ubuntu.slim.nightly|158 +|[adoptopenjdk/openjdk12:alpine](12/jdk/alpine/Dockerfile.hotspot.releases.full)|12.jdk.hotspot.alpine.full.releases|203 +|[adoptopenjdk/openjdk12:alpine-nightly](12/jdk/alpine/Dockerfile.hotspot.nightly.full)|12.jdk.hotspot.alpine.full.nightly|203 +|[adoptopenjdk/openjdk12:alpine-slim](12/jdk/alpine/Dockerfile.hotspot.releases.slim)|12.jdk.hotspot.alpine.slim.releases|126 +|[adoptopenjdk/openjdk12:alpine-nightly-slim](12/jdk/alpine/Dockerfile.hotspot.nightly.slim)|12.jdk.hotspot.alpine.slim.nightly|126 +|[adoptopenjdk/openjdk12-openj9:latest](12/jdk/ubuntu/Dockerfile.openj9.releases.full)|12.jdk.openj9.ubuntu.full.releases|243 +|[adoptopenjdk/openjdk12-openj9:nightly](12/jdk/ubuntu/Dockerfile.openj9.nightly.full)|12.jdk.openj9.ubuntu.full.nightly|243 +|[adoptopenjdk/openjdk12-openj9:slim](12/jdk/ubuntu/Dockerfile.openj9.releases.slim)|12.jdk.openj9.ubuntu.slim.releases|174 +|[adoptopenjdk/openjdk12-openj9:nightly-slim](12/jdk/ubuntu/Dockerfile.openj9.nightly.slim)|12.jdk.openj9.ubuntu.slim.nightly|174 +|[adoptopenjdk/openjdk12-openj9:alpine](12/jdk/alpine/Dockerfile.openj9.releases.full)|12.jdk.openj9.alpine.full.releases|196 +|[adoptopenjdk/openjdk12-openj9:alpine-nightly](12/jdk/alpine/Dockerfile.openj9.nightly.full)|12.jdk.openj9.alpine.full.nightly|196 +|[adoptopenjdk/openjdk12-openj9:alpine-slim](12/jdk/alpine/Dockerfile.openj9.releases.slim)|12.jdk.openj9.alpine.slim.releases|123 +|[adoptopenjdk/openjdk12-openj9:alpine-nightly-slim](12/jdk/alpine/Dockerfile.openj9.nightly.slim)|12.jdk.openj9.alpine.slim.nightly|123 + + + + -| 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. diff --git a/size-query.sh b/size-query.sh new file mode 100644 index 000000000..fe3e4f5b5 --- /dev/null +++ b/size-query.sh @@ -0,0 +1,67 @@ +#!/bin/bash +versions=( 8 11 12) +packages=( jdk jre) +jvms=( hotspot openj9) +oss=( ubuntu alpine) +types=( full slim) +builds=( releases nightly) + + +body="" + +for version in "${versions[@]}" +do + + for package in "${packages[@]}" + do + + for jvm in "${jvms[@]}" + do + + for os in "${oss[@]}" + do + for type in "${types[@]}" + do + for build in "${builds[@]}" + do + + descr=$version.$package.$jvm.$os.$type.$build + link=$version/$package/$os/Dockerfile.$jvm.$build.$type + + image="adoptopenjdk/openjdk"$version"-"$jvm + image=${image//-hotspot/} + + tag=$os"-"$package"-"$build"-"$type + tag=${tag//ubuntu-/} + tag=${tag//jdk-/} + tag=${tag//releases-/} + tag=${tag//-full/} + tag=${tag//full/latest} + + + + url="https://hub.docker.com/v2/repositories/$image/tags/$tag/" + echo $url + json=$(curl -s $url) + echo $json + size=$(echo $json | jq '.full_size') + echo $size + sizemb=$((size / 1024 /1024)) + + body=$body"|[$image:$tag]($link)|$descr|$sizemb"$'\n' + + done + done + done + done + + done + + +done + + +table="|Image|Description|Size"$'\n' +table=$table$'| --- | --- | --- \n' +table=$table$body +echo "$table"