Skip to content
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

Reduce debian container size by ~13mb #191

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 11/jdk/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ RUN set -eux \
&& apt-get update \
&& apt-get install -y java-11-amazon-corretto-jdk=1:$version \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
curl gnupg software-properties-common
curl gnupg software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto
4 changes: 3 additions & 1 deletion 17/jdk/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ RUN set -eux \
&& apt-get update \
&& apt-get install -y java-17-amazon-corretto-jdk=1:$version \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
curl gnupg software-properties-common
curl gnupg software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto
2 changes: 2 additions & 0 deletions 17/slim/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ RUN set -ux \
&& jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
curl gnupg software-properties-common binutils java-17-amazon-corretto-jdk=1:$version \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/lib/jvm \
&& mv /opt/corretto-slim /usr/lib/jvm/java-17-amazon-corretto \
&& jdk_tools="java keytool rmid rmiregistry javac jaotc jlink jmod jhsdb jar jarsigner javadoc javap jcmd jconsole jdb jdeps jdeprscan jimage jinfo jmap jps jrunscript jshell jstack jstat jstatd serialver" \
Expand Down
4 changes: 3 additions & 1 deletion 21/jdk/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ RUN set -eux \
&& apt-get update \
&& apt-get install -y java-21-amazon-corretto-jdk=1:$version \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
curl gnupg software-properties-common
curl gnupg software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/java-21-amazon-corretto
2 changes: 2 additions & 0 deletions 21/slim/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ RUN set -ux \
&& jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
curl gnupg software-properties-common binutils java-21-amazon-corretto-jdk=1:$version \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/lib/jvm \
&& mv /opt/corretto-slim /usr/lib/jvm/java-21-amazon-corretto \
&& jdk_tools="java keytool rmid rmiregistry javac jaotc jlink jmod jhsdb jar jarsigner javadoc javap jcmd jconsole jdb jdeps jdeprscan jimage jinfo jmap jps jrunscript jshell jstack jstat jstatd serialver" \
Expand Down
4 changes: 3 additions & 1 deletion 8/jdk/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ RUN set -eux \
&& apt-get update \
&& apt-get install -y java-1.8.0-amazon-corretto-jdk=1:$version \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
curl gnupg software-properties-common
curl gnupg software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto