Skip to content

Commit

Permalink
change to amazonlinux:2023
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelamo committed Feb 2, 2024
1 parent b455511 commit 4a4997a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a4997a

Please sign in to comment.