Skip to content

Commit

Permalink
new java 21 graalvm version images
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Oct 4, 2023
1 parent 2ac1424 commit d2db583
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion amazoncorretto-lambda-runtime-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# install base linux + tools
ARG AMAZON_CORRETTO_IMAGE=arm64v8/amazoncorretto:11.0.18
ARG AMAZON_CORRETTO_IMAGE=arm64v8/amazoncorretto:21.0.0
FROM $AMAZON_CORRETTO_IMAGE
RUN yum -y install zip

Expand Down
2 changes: 1 addition & 1 deletion amazoncorretto-lambda-runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# install base linux + tools
ARG AMAZON_CORRETTO_IMAGE=amazoncorretto:11.0.18
ARG AMAZON_CORRETTO_IMAGE=amazoncorretto:21.0.0
FROM $AMAZON_CORRETTO_IMAGE
RUN yum -y install zip

Expand Down
2 changes: 1 addition & 1 deletion amazonlinux-java-graal-community-lambda-runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# install base linux + tools
ARG AWS_LINUX_VERSION=2.0.20230119.1
ARG AWS_LINUX_VERSION=2.0.20230912.0
FROM amazonlinux:$AWS_LINUX_VERSION

RUN yum install -y gcc gcc-c++ libc6-dev binutils zlib1g-dev curl bash zlib zlib-devel tar zip gzip
Expand Down
4 changes: 2 additions & 2 deletions amazonlinux-java-graal-community-lambda-runtime/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# http4k/amazonlinux-java-graal-ce-lambda-runtime
# http4k/amazonlinux-java-graal-community-lambda-runtime

This image builds a runtime ZIP file containing a Java GraalVM binary for Amazon Linux. It is designed to work with a ShadowJar containing an http4k AWS Lambda function and, given a tasteful selection of technologies, should not require any customisation of the GraalVM configuration.

Expand All @@ -9,7 +9,7 @@ Basic usage for an example project. Arguments to the docker run command:
```shell
./gradlew shadowJar
docker run -v $(pwd):/source \
http4k/amazonlinux-java-graal-ce-lambda-runtime:latest <UBERJAR_PATH> <OUTPUT_ZIP_PATH?>
http4k/amazonlinux-java-graal-community-lambda-runtime:latest <UBERJAR_PATH> <OUTPUT_ZIP_PATH?>
```

The Docker image itself includes 2 script files loaded from this repo:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -eu
export AWS_LINUX_VERSION=2.0.20230119.1
export JAVA_VERSION=$1
export AWS_LINUX_VERSION=2.0.20230912.0
export JAVA_VERSION=jdk-$1

docker build --build-arg AWS_LINUX_VERSION=$AWS_LINUX_VERSION \
--build-arg JAVA_VERSION="$JAVA_VERSION" \
Expand Down
13 changes: 7 additions & 6 deletions build-and-push-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
set -eu
docker login

JAVA_VERSIONS=("11.0.18" "17.0.6" "19.0.2")
GRAAL_JAVA_VERSIONS=("java11" "java17" "java19")
JAVA_VERSIONS=("11.0.18" "17.0.6" "19.0.2" "21.0.0")

cd amazoncorretto-lambda-runtime
for version in "${JAVA_VERSIONS[@]}"; do
./build-and-push.sh $version
./build-and-push.sh "$version"
done
cd ..

cd amazoncorretto-lambda-runtime-arm64
for version in "${JAVA_VERSIONS[@]}"; do
./build-and-push.sh $version
./build-and-push.sh "$version"
done
cd ..

cd amazonlinux-java-graal-ce-lambda-runtime
GRAAL_JAVA_VERSIONS=("21.0.0")

cd amazonlinux-java-graal-community-lambda-runtime
for version in "${GRAAL_JAVA_VERSIONS[@]}"; do
./build-and-push.sh $version
./build-and-push.sh "$version"
done
cd ..

0 comments on commit d2db583

Please sign in to comment.