Skip to content

Commit 75c309c

Browse files
committed
docs: add note for building sample on ARM (#1209)
1 parent 9378840 commit 75c309c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

samples/springboot3/pet-store-native/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ RUN yum -y update \
88

99
# Graal VM
1010
ENV GRAAL_VERSION 21.0.2
11-
ENV GRAAL_FILENAME graalvm-community-jdk-${GRAAL_VERSION}_linux-x64_bin.tar.gz
11+
ENV ARCHITECTURE x64
12+
ENV GRAAL_FILENAME graalvm-community-jdk-${GRAAL_VERSION}_linux-${ARCHITECTURE}_bin.tar.gz
1213
RUN curl -4 -L https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${GRAAL_VERSION}/${GRAAL_FILENAME} | tar -xvz
1314
RUN mv graalvm-community-openjdk-${GRAAL_VERSION}* /usr/lib/graalvm
1415
ENV JAVA_HOME /usr/lib/graalvm

samples/springboot3/pet-store-native/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ In this sample, you'll build a native GraalVM image for running web workloads in
55

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

8+
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, ...
9+
you must change the according line in the `Dockerfile` to `ENV ARCHITECTURE aarch64`.
10+
In addition, uncomment the `arm64` Architectures section in `template.yml`.
11+
812
### Step 1 - Build the native image
913

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

0 commit comments

Comments
 (0)