Skip to content

Commit

Permalink
docs: add note for building sample on ARM (#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
deki committed Dec 12, 2024
1 parent 9378840 commit 75c309c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion samples/springboot3/pet-store-native/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ RUN yum -y update \

# Graal VM
ENV GRAAL_VERSION 21.0.2
ENV GRAAL_FILENAME graalvm-community-jdk-${GRAAL_VERSION}_linux-x64_bin.tar.gz
ENV ARCHITECTURE x64
ENV GRAAL_FILENAME graalvm-community-jdk-${GRAAL_VERSION}_linux-${ARCHITECTURE}_bin.tar.gz
RUN curl -4 -L https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${GRAAL_VERSION}/${GRAAL_FILENAME} | tar -xvz
RUN mv graalvm-community-openjdk-${GRAAL_VERSION}* /usr/lib/graalvm
ENV JAVA_HOME /usr/lib/graalvm
Expand Down
4 changes: 4 additions & 0 deletions samples/springboot3/pet-store-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ In this sample, you'll build a native GraalVM image for running web workloads in

You first need to build the function, then you will deploy it to AWS Lambda.

Please note that the sample is for `x86` architectures. In case you want to build and run it on ARM, e.g. Apple Mac M1, M2, ...
you must change the according line in the `Dockerfile` to `ENV ARCHITECTURE aarch64`.
In addition, uncomment the `arm64` Architectures section in `template.yml`.

### Step 1 - Build the native image

Before starting the build, you must clone or download the code in **pet-store-native**.
Expand Down

0 comments on commit 75c309c

Please sign in to comment.