From 4a4997afd269bf74e7c931e240e3840e9dd34974 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Fri, 2 Feb 2024 10:09:10 +0100 Subject: [PATCH] change to amazonlinux:2023 see: https://github.com/micronaut-projects/micronaut-gradle-plugin/pull/929 --- .../it/dockerfile-docker-native-lambda/Dockerfile.aarch64 | 6 +++--- .../src/it/dockerfile-docker-native-lambda/Dockerfile.amd64 | 6 +++--- .../src/site/asciidoc/examples/package.adoc | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.aarch64 b/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.aarch64 index 91fcca884..1f8383faa 100644 --- a/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.aarch64 +++ b/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.aarch64 @@ -1,6 +1,6 @@ -FROM amazonlinux:2 AS graalvm +FROM amazonlinux:2023 AS graalvm ENV LANG=en_US.UTF-8 -RUN yum update -y && yum install -y gcc gcc-c++ libc6-dev zlib1g-dev curl bash zlib zlib-devel zlib-static zip tar gzip && yum clean all && rm -rf /var/cache/yum +RUN yum update -y && yum install -y gcc gcc-c++ glibc-devel curl-minimal bash zlib zlib-devel zlib-static zip tar gzip && yum clean all && rm -rf /var/cache/yum RUN curl -4 -L https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-aarch64_bin.tar.gz -o /tmp/graalvm.tar.gz \ && mkdir -p /usr/lib/graalvm \ && tar -zxf /tmp/graalvm.tar.gz -C /usr/lib/graalvm --strip-components 1 \ @@ -14,7 +14,7 @@ COPY nativ[e]/generated /home/app/ COPY *.args /home/app/graalvm-native-image.args RUN native-image @/home/app/graalvm-native-image.args -H:Class=io.micronaut.function.aws.runtime.MicronautLambdaRuntime -H:Name=application -cp "/home/app/libs/*:/home/app/classes/" -FROM amazonlinux:2 +FROM amazonlinux:2023 WORKDIR /function RUN yum update -y && yum install -y zip && yum clean all COPY --from=graalvm /home/app/application /function/func diff --git a/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.amd64 b/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.amd64 index e466ef10b..1d4e36335 100644 --- a/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.amd64 +++ b/micronaut-maven-integration-tests/src/it/dockerfile-docker-native-lambda/Dockerfile.amd64 @@ -1,6 +1,6 @@ -FROM amazonlinux:2 AS graalvm +FROM amazonlinux:2023 AS graalvm ENV LANG=en_US.UTF-8 -RUN yum update -y && yum install -y gcc gcc-c++ libc6-dev zlib1g-dev curl bash zlib zlib-devel zlib-static zip tar gzip && yum clean all && rm -rf /var/cache/yum +RUN yum update -y && yum install -y gcc gcc-c++ glibc-devel curl-minimal bash zlib zlib-devel zlib-static zip tar gzip && yum clean all && rm -rf /var/cache/yum RUN curl -4 -L https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_linux-x64_bin.tar.gz -o /tmp/graalvm.tar.gz \ && mkdir -p /usr/lib/graalvm \ && tar -zxf /tmp/graalvm.tar.gz -C /usr/lib/graalvm --strip-components 1 \ @@ -14,7 +14,7 @@ COPY nativ[e]/generated /home/app/ COPY *.args /home/app/graalvm-native-image.args RUN native-image @/home/app/graalvm-native-image.args -H:Class=io.micronaut.function.aws.runtime.MicronautLambdaRuntime -H:Name=application -cp "/home/app/libs/*:/home/app/classes/" -FROM amazonlinux:2 +FROM amazonlinux:2023 WORKDIR /function RUN yum update -y && yum install -y zip && yum clean all COPY --from=graalvm /home/app/application /function/func diff --git a/micronaut-maven-plugin/src/site/asciidoc/examples/package.adoc b/micronaut-maven-plugin/src/site/asciidoc/examples/package.adoc index 6c7b6c15e..44de55b0d 100644 --- a/micronaut-maven-plugin/src/site/asciidoc/examples/package.adoc +++ b/micronaut-maven-plugin/src/site/asciidoc/examples/package.adoc @@ -217,7 +217,7 @@ command line: Note that changing the base image to a totally different one than the default might break image building, since the rest of the build steps expect a certain base image. By default, the native images are built from an `ghcr.io/graalvm/native-image-community` image. -In the case of AWS custom runtime, it starts from `amazonlinux:2`, and this cannot be changed. Also, in this case the +In the case of AWS custom runtime, it starts from `amazonlinux:2023`, and this cannot be changed. Also, in this case the result is not a tagged Docker image, but a `function.zip` archive that contains the launch script and the native binary. Essentially, what you need to upload to AWS Lambda. Also in this case, the Micronaut Maven Plugin will detect the host operating system architecture (based on the `os.arch` Java system property) and will install the corresponding GraalVM