-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new sample for native web workloads #748
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Added a few minor comments. I see we also have a Java bootstrap file and assembly configuration - do we need it in this sample? If so we should mention it in the README on how to build the non-native version as well.
samples/springboot3/function-sample-aws-serverless-web-native/template.yaml
Show resolved
Hide resolved
@@ -0,0 +1,46 @@ | |||
FROM arm64v8/amazonlinux:2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use Amazon Linux 2023 and GraalVM 21.0.2
my working version:
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
RUN yum -y update \
&& yum install -y unzip tar gzip bzip2-devel ed gcc gcc-c++ gcc-gfortran \
less libcurl-devel openssl openssl-devel readline-devel xz-devel \
zlib-devel glibc-static zlib-static \
&& rm -rf /var/cache/yum
# Graal VM
ENV GRAAL_VERSION 21.0.2
ENV GRAAL_FILENAME graalvm-community-jdk-${GRAAL_VERSION}_linux-x64_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
# Maven
ENV MVN_VERSION 3.9.6
ENV MVN_FOLDERNAME apache-maven-${MVN_VERSION}
ENV MVN_FILENAME apache-maven-${MVN_VERSION}-bin.tar.gz
RUN curl -4 -L https://archive.apache.org/dist/maven/maven-3/${MVN_VERSION}/binaries/${MVN_FILENAME} | tar -xvz
RUN mv $MVN_FOLDERNAME /usr/lib/maven
#Native Image dependencies
RUN ln -s /usr/lib/graalvm/bin/native-image /usr/bin/native-image
RUN ln -s /usr/lib/maven/bin/mvn /usr/bin/mvn
ENV JAVA_HOME /usr/lib/graalvm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update
I will be closing this PR and submitting an update to #739 which will include sample with changes sugested here |
Also, I was not successful with the docker file update since I need |
Closing it, since new sample will be pushed as an update to #739 |
Add new sample to use Spring native support with web workloads
By submitting this pull request