Skip to content

Commit

Permalink
Add GraalVM images
Browse files Browse the repository at this point in the history
This PR adds images that use GraalVM Community and Oracle GraalVM for JDK 17 and 21.

Fixes carlossg#242
  • Loading branch information
alvarosanchez committed Feb 8, 2024
1 parent 59723b9 commit ad6fc23
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 55 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/graalvm-community-17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: graalvm-community-17

on:
push:
branches:
- main
paths:
- "graalvm-community-17/**"
- .github/workflows/graalvm-community-17.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "graalvm-community-17/**"
- .github/workflows/graalvm-community-17.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: graalvm-community-17
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/graalvm-community-21.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: graalvm-community-21

on:
push:
branches:
- main
paths:
- "graalvm-community-21/**"
- .github/workflows/graalvm-community-21.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "graalvm-community-21/**"
- .github/workflows/graalvm-community-21.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: graalvm-community-21
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/oracle-graalvm-17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: oracle-graalvm-17

on:
push:
branches:
- main
paths:
- "oracle-graalvm-17/**"
- .github/workflows/oracle-graalvm-17.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "oracle-graalvm-17/**"
- .github/workflows/oracle-graalvm-17.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: oracle-graalvm-17
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/oracle-graalvm-21.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: oracle-graalvm-21

on:
push:
branches:
- main
paths:
- "oracle-graalvm-21/**"
- .github/workflows/oracle-graalvm-21.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "oracle-graalvm-21/**"
- .github/workflows/oracle-graalvm-21.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: oracle-graalvm-21
secrets: inherit
110 changes: 57 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,58 +200,62 @@ This is the defacto image. If you are unsure about what your needs are, you prob
The following packages are currently installed in each variant.
Some come from the parent images and some are installed in this image for backwards compatibility.

| | git | curl | tar | bash | which | gzip | procps | gpg | ssh |
|-------------------------------|-----|------|-----|------|-------|------|--------|-----|-----|
| amazoncorretto-8 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-8-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-8-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| amazoncorretto-11 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-11-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-11-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| amazoncorretto-17 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-17-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-17-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| amazoncorretto-21 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-21-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-21-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| azulzulu-8 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-8-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-11 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-11-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-17 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-17-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-21 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-21-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-8 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-8-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-8-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-11 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-11-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-11-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-17 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-17-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-17-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-21 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-21-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibm-semeru-11-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibm-semeru-17-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibm-semeru-21-jammy | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibmjava-8 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-8 | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | |
| libericaopenjdk-8-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-8-debian | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| libericaopenjdk-11 | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | |
| libericaopenjdk-11-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-11-debian | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| libericaopenjdk-17 | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | |
| libericaopenjdk-17-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-17-debian | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| microsoft-openjdk-11-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| microsoft-openjdk-17-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| microsoft-openjdk-21-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| sapmachine-11 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| sapmachine-17 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| sapmachine-21 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| | git | curl | tar | bash | which | gzip | procps | gpg | ssh |
|-----------------------------|-----|------|-----|------|-------|------|--------|-----|-----|
| amazoncorretto-8 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-8-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-8-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| amazoncorretto-11 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-11-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-11-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| amazoncorretto-17 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-17-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-17-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| amazoncorretto-21 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-21-al2023 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ | |
| amazoncorretto-21-debian | | | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| azulzulu-8 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-8-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-11 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-11-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-17 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-17-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-21 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| azulzulu-21-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-8 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-8-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-8-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-11 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-11-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-11-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-17 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-17-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-17-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-21 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| eclipse-temurin-21-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| graalvm-community-17 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ || ✔️ | |
| graalvm-community-21 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ || ✔️ | |
| ibm-semeru-11-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibm-semeru-17-focal | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibm-semeru-21-jammy | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| ibmjava-8 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-8 | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | |
| libericaopenjdk-8-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-8-debian | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| libericaopenjdk-11 | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | |
| libericaopenjdk-11-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-11-debian | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| libericaopenjdk-17 | | ✔️ | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | |
| libericaopenjdk-17-alpine | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| libericaopenjdk-17-debian | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | |
| microsoft-openjdk-11-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| microsoft-openjdk-17-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| microsoft-openjdk-21-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| sapmachine-11 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| sapmachine-17 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| sapmachine-21 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | |
| oracle-graalvm-17 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ || ✔️ | |
| oracle-graalvm-21 | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ || ✔️ | |



Expand Down Expand Up @@ -313,8 +317,8 @@ Pester comes with most modern Windows (Windows 10 and Windows Server 2019), but

* Copy an existing dir (other than `eclipse-temurin-11`) to the new name and update `Dockerfile` as needed.
* Update `README.md` to include the new image and table with packages installed in that image.
* Run `github-action-generation.sh` to generate new GitHub Actions for the new image
* When adding a new JDK then it also needs to be added to the beginning of `common.sh`
* Run `github-action-generation.sh` to generate new GitHub Actions for the new image
* When a parent image changes the `latest` tag to a new JDK version it can be updated in `common.sh`

## Updating Maven version
Expand Down
6 changes: 4 additions & 2 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ latest='21'
default_jdk=eclipse-temurin

# All the JDKs and their 'latest' tags
parent_images=(openjdk eclipse-temurin ibmjava ibm-semeru amazoncorretto libericaopenjdk sapmachine)
parent_images=(openjdk eclipse-temurin ibmjava ibm-semeru amazoncorretto libericaopenjdk sapmachine graalvm-community oracle-graalvm)
declare -A jdk_latest=(
["jdk"]="17"
["openjdk"]=""
Expand All @@ -18,6 +18,8 @@ declare -A jdk_latest=(
["amazoncorretto"]="11"
["libericaopenjdk"]="17"
["sapmachine"]="21"
["graalvm-community"]="21"
["oracle-graalvm"]="21"
)

# Variants of the JDKs and their 'latest' tag
Expand All @@ -29,7 +31,7 @@ declare -A extra_tags=(
)

# All the directories that have images
all_dirs=(openjdk-* eclipse-temurin-* ibmjava-* ibm-semeru-* amazoncorretto-* azulzulu-* libericaopenjdk-* microsoft-* sapmachine-*)
all_dirs=(openjdk-* eclipse-temurin-* ibmjava-* ibm-semeru-* amazoncorretto-* azulzulu-* libericaopenjdk-* microsoft-* sapmachine-* graalvm-community-* oracle-graalvm-*)

######################################################################################################################################

Expand Down
17 changes: 17 additions & 0 deletions graalvm-community-17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ghcr.io/graalvm/graalvm-community:17

# common for all images
ENV MAVEN_HOME /usr/share/maven

COPY --from=maven:3.9.6-eclipse-temurin-11 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.6-eclipse-temurin-11 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.6-eclipse-temurin-11 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.6
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
17 changes: 17 additions & 0 deletions graalvm-community-21/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ghcr.io/graalvm/graalvm-community:21

# common for all images
ENV MAVEN_HOME /usr/share/maven

COPY --from=maven:3.9.6-eclipse-temurin-11 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.6-eclipse-temurin-11 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.6-eclipse-temurin-11 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.6
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
19 changes: 19 additions & 0 deletions oracle-graalvm-17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM container-registry.oracle.com/graalvm/native-image:17

RUN microdnf --refresh -y install findutils which

# common for all images
ENV MAVEN_HOME /usr/share/maven

COPY --from=maven:3.9.6-eclipse-temurin-11 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.6-eclipse-temurin-11 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.6-eclipse-temurin-11 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.6
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
Loading

0 comments on commit ad6fc23

Please sign in to comment.