-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (35 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM public.ecr.aws/amazonlinux/amazonlinux:2
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 libcxx libcxx-devel llvm-toolset-7 zlib-static \
&& rm -rf /var/cache/yum
# Graal VM
ENV JAVA_VERSION java17
ENV GRAAL_VERSION 22.1.0
ENV GRAAL_FOLDERNAME graalvm-ce-${JAVA_VERSION}-${GRAAL_VERSION}
ENV GRAAL_FILENAME graalvm-ce-${JAVA_VERSION}-linux-amd64-${GRAAL_VERSION}.tar.gz
RUN curl -4 -L https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAAL_VERSION}/${GRAAL_FILENAME} | tar -xvz
RUN mv $GRAAL_FOLDERNAME /usr/lib/graalvm
RUN rm -rf $GRAAL_FOLDERNAME
# Gradle
ENV GRADLE_VERSION 7.3.1
ENV GRADLE_FOLDERNAME gradle-${GRADLE_VERSION}
ENV GRALE_FILENAME ${GRADLE_FOLDERNAME}-bin.zip
RUN curl -L https://services.gradle.org/distributions/${GRALE_FILENAME} > $GRALE_FILENAME
RUN unzip -o $GRALE_FILENAME
RUN mv $GRADLE_FOLDERNAME /usr/lib/gradle
RUN rm $GRALE_FILENAME
ENV PATH=$PATH:/usr/lib/gradle/bin
# AWS Lambda Builders
RUN amazon-linux-extras enable python3.8
RUN yum clean metadata && yum -y install python3.8
RUN curl -L get-pip.io | python3.8
RUN pip3 install aws-lambda-builders
VOLUME /project
WORKDIR /project
RUN /usr/lib/graalvm/bin/gu install native-image
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
ENTRYPOINT ["sh"]