FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lambda-java-layer/Dockerfile at main · roamingthings/lambda-java-layer · GitHub
roamingthings
/
lambda-java-layer
Public
forked from
msailes/lambda-java17-layer
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lambda-java-layer
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (20 loc) · 1.17 KB
Breadcrumbs
lambda-java-layer
/
Dockerfile
Copy path
File metadata and controls
23 lines (20 loc) · 1.17 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM
amazonlinux:2 as packager
ARG
JDK_VERSION=17
RUN
yum -y update \
&& yum install -y tar zip unzip 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
ENV
JDK_FOLDERNAME jdk-${JDK_VERSION}
ENV
JDK_FILENAME amazon-corretto-${JDK_VERSION}-x64-linux-jdk.tar.gz
RUN
mkdir $JDK_FOLDERNAME && curl -4 -L https://corretto.aws/downloads/latest/${JDK_FILENAME} | tar -xvz --strip-components=1 -C $JDK_FOLDERNAME
RUN
mv $JDK_FOLDERNAME /usr/lib/jdk${JDK_VERSION}
RUN
yum install -y binutils
RUN
rm -rf $JDK_FOLDERNAME
ENV
PATH=
"/usr/lib/jdk${JDK_VERSION}/bin:$PATH"
RUN
jlink --add-modules
"$(java --list-modules | cut -f1 -d'@' | tr '
\n
' ',')"
--compress 0 --no-man-pages --no-header-files --strip-debug --output /opt/jre-slim
RUN
find /opt/jre-slim/lib -name *.so -exec strip -p --strip-unneeded {}
\;
RUN
java -Xshare:dump -version
RUN
rm /opt/jre-slim/lib/classlist
RUN
cp /usr/lib/jdk${JDK_VERSION}/lib/server/classes.jsa /opt/jre-slim/lib/server/classes.jsa
RUN
cd /opt/ && zip -r jre-${JDK_VERSION}-slim.zip jre-slim
Back
|
FazBrowse Home
|
New Git URL