-
Notifications
You must be signed in to change notification settings - Fork 40
Issue in Corretto 8 Docker Images #48
Comments
@amalkapathirage Looks to me you are trying to create a Corretto 8 JRE image right? Instead of pulling the rpm from the Corretto download page, a more convenient way is to use the amazon-linux-extra rpm repo described here. If you only need JRE, in your dockerfile, try:
|
Possible but its 417MB This is the Docker file used earlier ...this is 163MB why its looking for the dependancies mentioned. FROM amazonlinux:2 x86_64 argsARG rpm_x64=java-1.8.0-amazon-corretto-1.8.0_232.b09-1.amzn2.0.1.x86_64.rpm aarch64 argsARG rpm_aarch64=java-1.8.0-amazon-corretto-1.8.0_232.b09-1.amzn2.0.1.aarch64.rpm RUN set -eux; ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto |
@amalkapathirage Modify your Dockerfile:
I do not want to disappoint you but this is equivalent to the installation using amazon-linux-extras. I see you want to reduce the Corretto docker image size however this is not easy for now. You may find the amazon linux JRE rpm significantly smaller than the generic linux JDK rpm. This is because the Amazon Linux version of Corretto is configured to depend on the system libraries therefore it is smaller but requires installing dependency packages during the yum installation. The generic Linux however, even static links libstdc++ & libgcc, therefore the rpm itself is much bigger. As my teammate mentioned in another issue, we are reconsidering the packaging of the generic Linux rpm. i.e., we are considering splitting the fat rpm into JRE & JDK rpms. You can follow other related issues: corretto-8#45 & corretto-8#193. |
still it is 417MB. |
@amalkapathirage Please note the difference between
|
An issue in Corretto 8 Docker Images
Changes to the docker file
FROM amazonlinux:2
x86_64 args
ARG rpm_x64=java-1.8.0-amazon-corretto-1.8.0_232.b09-1.amzn2.0.1.x86_64.rpm
aarch64 args
ARG rpm_aarch64=java-1.8.0-amazon-corretto-1.8.0_232.b09-1.amzn2.0.1.aarch64.rpm
Failed dependencies:
Get the following error when try to build the docker image
error: Failed dependencies:
dejavu-sans-fonts is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
dejavu-sans-mono-fonts is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
dejavu-serif-fonts is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
giflib is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
jpackage-utils is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libGL.so.1()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libX11.so.6()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libXext.so.6()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libXi.so.6()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libXrender.so.1()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libXtst.so.6()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libXxf86vm.so.1()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libasound.so.2()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libasound.so.2(ALSA_0.9)(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libasound.so.2(ALSA_0.9.0rc4)(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libatk-1.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libcairo.so.2()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libfontconfig.so.1()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libfreetype.so.6()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libgdk-x11-2.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libgdk_pixbuf-2.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libgif.so.4()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libgtk-x11-2.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libpango-1.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libpangocairo-1.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
libpangoft2-1.0.so.0()(64bit) is needed by java-1.8.0-amazon-corretto-1:1.8.0_232.b09-1.amzn2.0.1.x86_64
The command '/bin/sh -c set -eux; case "$(uname -p)" in x86_64) rpm=$rpm_x64; path=$path_x64; key=$key_x64 ;; aarch64) rpm=$rpm_aarch64; path=$path_aarch64; key=$key_aarch64 ;; *) echo >&2 "Unsupported architecture $(uname -p)."; exit 1 ;; esac; curl -O $path/$rpm && export GNUPGHOME="$(mktemp -d)" && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys $key && gpg --armor --export $key > corretto.asc && rpm --import corretto.asc && rpm -K $rpm && rpm -i $rpm && rm -r $GNUPGHOME corretto.asc $rpm && yum install -y fontconfig && yum clean all' returned a non-zero code: 1
The text was updated successfully, but these errors were encountered: