diff --git a/.github/workflows/graalvm-community-17.yml b/.github/workflows/graalvm-community-17.yml new file mode 100644 index 00000000..61307337 --- /dev/null +++ b/.github/workflows/graalvm-community-17.yml @@ -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 diff --git a/.github/workflows/graalvm-community-21.yml b/.github/workflows/graalvm-community-21.yml new file mode 100644 index 00000000..a17107e8 --- /dev/null +++ b/.github/workflows/graalvm-community-21.yml @@ -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 diff --git a/.github/workflows/oracle-graalvm-17.yml b/.github/workflows/oracle-graalvm-17.yml new file mode 100644 index 00000000..cb4e9615 --- /dev/null +++ b/.github/workflows/oracle-graalvm-17.yml @@ -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 diff --git a/.github/workflows/oracle-graalvm-21.yml b/.github/workflows/oracle-graalvm-21.yml new file mode 100644 index 00000000..1b997b2b --- /dev/null +++ b/.github/workflows/oracle-graalvm-21.yml @@ -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 diff --git a/README.md b/README.md index 0719749c..072bab92 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ Only under `csanchez/maven` and `ghcr.io/carlossg/maven`: * [azulzulu-17-alpine](https://github.com/carlossg/docker-maven/blob/main/azulzulu-17-alpine/Dockerfile) * [azulzulu-21](https://github.com/carlossg/docker-maven/blob/main/azulzulu-21/Dockerfile) * [azulzulu-21-alpine](https://github.com/carlossg/docker-maven/blob/main/azulzulu-21-alpine/Dockerfile) +* [graalvm-community-17](https://github.com/carlossg/docker-maven/blob/main/graalvm-community-17/) +* [graalvm-community-21](https://github.com/carlossg/docker-maven/blob/main/graalvm-community-21/) * [libericaopenjdk-11](https://github.com/carlossg/docker-maven/blob/main/libericaopenjdk-11/Dockerfile) * [libericaopenjdk-11-alpine](https://github.com/carlossg/docker-maven/blob/main/libericaopenjdk-11-alpine/Dockerfile) * [libericaopenjdk-17](https://github.com/carlossg/docker-maven/blob/main/libericaopenjdk-17/Dockerfile) @@ -73,6 +75,8 @@ Only under `csanchez/maven` and `ghcr.io/carlossg/maven`: * [microsoft-openjdk-11-ubuntu](https://github.com/carlossg/docker-maven/blob/main/microsoft-openjdk-11-ubuntu/Dockerfile) * [microsoft-openjdk-17-ubuntu](https://github.com/carlossg/docker-maven/blob/main/microsoft-openjdk-17-ubuntu/Dockerfile) * [microsoft-openjdk-21-ubuntu](https://github.com/carlossg/docker-maven/blob/main/microsoft-openjdk-21-ubuntu/Dockerfile) +* [oracle-graalvm-17](https://github.com/carlossg/docker-maven/blob/main/oracle-graalvm-17/) +* [oracle-graalvm-21](https://github.com/carlossg/docker-maven/blob/main/oracle-graalvm-21/) ## Windows Based Images @@ -233,6 +237,8 @@ Some come from the parent images and some are installed in this image for backwa | 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 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | @@ -249,6 +255,8 @@ Some come from the parent images and some are installed in this image for backwa | microsoft-openjdk-11-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | microsoft-openjdk-17-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | microsoft-openjdk-21-ubuntu | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | +| oracle-graalvm-17 | | ✔️ | ✔️ | ✔️ | | ✔️ | | ✔️ | | +| oracle-graalvm-21 | | ✔️ | ✔️ | ✔️ | | ✔️ | | ✔️ | | | sapmachine-11 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | sapmachine-17 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | | sapmachine-21 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | | @@ -313,8 +321,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 diff --git a/common.sh b/common.sh index 5d92163b..7aace869 100755 --- a/common.sh +++ b/common.sh @@ -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"]="" @@ -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 @@ -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-*) ###################################################################################################################################### diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 521bfb60..02c2382e 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -80,17 +80,15 @@ echo "GitRepo: $url" echo 'GitFetch: refs/heads/main' for version in "${all_dirs[@]}"; do - # ignore images that can't be official - if grep -q "FROM mcr.microsoft.com" "$version/Dockerfile"; then - continue - fi - # ignore all windows images - if grep -q "FROM .*windows" "$version/Dockerfile"; then - continue - fi - if [[ "$version" != azulzulu* ]] && [[ "$version" != liberica* ]]; then - branch=main - mapfile -t versionAliases < <(version-aliases "$version" "$branch") - generate-version "$version" "$branch" "${versionAliases[@]}" - fi + # ignore images that can't be official and windows + ignore_from=(".*windows" "container-registry.oracle.com" "ghcr.io" "mcr.microsoft.com" "azul/" "bellsoft/") + for ignore in "${ignore_from[@]}"; do + if grep -q "FROM $ignore" "$version/Dockerfile"; then + continue 2 + fi + done + + branch=main + mapfile -t versionAliases < <(version-aliases "$version" "$branch") + generate-version "$version" "$branch" "${versionAliases[@]}" done diff --git a/graalvm-community-17/Dockerfile b/graalvm-community-17/Dockerfile new file mode 100644 index 00000000..ce84bea7 --- /dev/null +++ b/graalvm-community-17/Dockerfile @@ -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"] diff --git a/graalvm-community-21/Dockerfile b/graalvm-community-21/Dockerfile new file mode 100644 index 00000000..e2240113 --- /dev/null +++ b/graalvm-community-21/Dockerfile @@ -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"] diff --git a/oracle-graalvm-17/Dockerfile b/oracle-graalvm-17/Dockerfile new file mode 100644 index 00000000..e08bafd1 --- /dev/null +++ b/oracle-graalvm-17/Dockerfile @@ -0,0 +1,19 @@ +FROM container-registry.oracle.com/graalvm/native-image:17 + +RUN microdnf --refresh -y install findutils + +# 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"] diff --git a/oracle-graalvm-21/Dockerfile b/oracle-graalvm-21/Dockerfile new file mode 100644 index 00000000..60b5b0cf --- /dev/null +++ b/oracle-graalvm-21/Dockerfile @@ -0,0 +1,19 @@ +FROM container-registry.oracle.com/graalvm/native-image:21 + +RUN microdnf --refresh -y install findutils + +# 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"] diff --git a/tests/tests.bats b/tests/tests.bats index dacc1f20..44881e70 100644 --- a/tests/tests.bats +++ b/tests/tests.bats @@ -83,7 +83,8 @@ base_image=eclipse-temurin-11 [[ "$SUT_TAG" == "amazoncorretto-"* ]] || [[ "$SUT_TAG" == "azulzulu-"* ]] || [[ "$SUT_TAG" == "ibmjava-"* ]] || - [[ "$SUT_TAG" == "libericaopenjdk-"* ]] + [[ "$SUT_TAG" == "libericaopenjdk-"* ]] || + [[ "$SUT_TAG" == *"graalvm"* ]] ); then [ $status -eq 0 ] else @@ -116,7 +117,8 @@ base_image=eclipse-temurin-11 if ! ( [[ "$SUT_TAG" == libericaopenjdk-? ]] || [[ "$SUT_TAG" == libericaopenjdk-?? ]] || - [[ "$SUT_TAG" == openjdk-?? ]] + [[ "$SUT_TAG" == openjdk-?? ]] || + [[ "$SUT_TAG" == *"oracle"* ]] ); then [ $status -eq 0 ] else @@ -134,7 +136,9 @@ base_image=eclipse-temurin-11 if ! ( [[ "$SUT_TAG" == "amazoncorretto-"* ]] || [[ "$SUT_TAG" == libericaopenjdk-*-debian ]] || - [[ "$SUT_TAG" == openjdk-?? ]] + [[ "$SUT_TAG" == openjdk-?? ]] || + [[ "$SUT_TAG" == *"graalvm"* ]] + ); then [ $status -eq 0 ] @@ -151,7 +155,8 @@ base_image=eclipse-temurin-11 [[ "$SUT_TAG" == amazoncorretto-*-al2023 ]] || [[ "$SUT_TAG" == libericaopenjdk-? ]] || [[ "$SUT_TAG" == libericaopenjdk-?? ]] || - [[ "$SUT_TAG" == openjdk-?? ]] + [[ "$SUT_TAG" == openjdk-?? ]] || + [[ "$SUT_TAG" == *"graalvm"* ]] ); then [ $status -eq 0 ] else