From edad5c39f3d6361ebc07153dfb25a9f3cd35aef1 Mon Sep 17 00:00:00 2001 From: Leo Herran Date: Wed, 2 Oct 2024 14:41:13 -0700 Subject: [PATCH] Apply fixes for Corretto runtime versions --- al2/aarch64/standard/2.0/runtimes.yml | 6 +++--- al2/aarch64/standard/3.0/runtimes.yml | 6 +++--- al2/x86_64/standard/4.0/runtimes.yml | 7 ++----- al2/x86_64/standard/5.0/Dockerfile | 2 +- al2/x86_64/standard/5.0/runtimes.yml | 6 +++--- ubuntu/standard/7.0/Dockerfile | 3 +-- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/al2/aarch64/standard/2.0/runtimes.yml b/al2/aarch64/standard/2.0/runtimes.yml index fd61b48..fa363cb 100644 --- a/al2/aarch64/standard/2.0/runtimes.yml +++ b/al2/aarch64/standard/2.0/runtimes.yml @@ -44,10 +44,10 @@ runtimes: default: commands: - echo "Installing custom Corretto(OpenJDK) version $VERSION ..." - - yum -y install java-$VERSION-amazon-corretto-devel - export JAVA_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" - - export JRE_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" - - export JDK_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" + - export JRE_HOME=$JAVA_HOME + - export JDK_HOME=$JAVA_HOME + - yum --disablerepo="*" --enablerepo="AmazonCorretto" -y install java-$VERSION-amazon-corretto-devel - |- for tool_path in "$JAVA_HOME"/bin/*; do tool=`basename "$tool_path"`; diff --git a/al2/aarch64/standard/3.0/runtimes.yml b/al2/aarch64/standard/3.0/runtimes.yml index 9c9709e..6bd8e92 100644 --- a/al2/aarch64/standard/3.0/runtimes.yml +++ b/al2/aarch64/standard/3.0/runtimes.yml @@ -70,10 +70,10 @@ runtimes: default: commands: - echo "Installing custom Corretto(OpenJDK) version $VERSION ..." - - yum -y install java-$VERSION-amazon-corretto-devel - export JAVA_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" - - export JRE_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" - - export JDK_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" + - export JRE_HOME=$JAVA_HOME + - export JDK_HOME=$JAVA_HOME + - yum --disablerepo="*" --enablerepo="AmazonCorretto" -y install java-$VERSION-amazon-corretto-devel - |- for tool_path in "$JAVA_HOME"/bin/*; do tool=`basename "$tool_path"`; diff --git a/al2/x86_64/standard/4.0/runtimes.yml b/al2/x86_64/standard/4.0/runtimes.yml index a404085..7646374 100644 --- a/al2/x86_64/standard/4.0/runtimes.yml +++ b/al2/x86_64/standard/4.0/runtimes.yml @@ -25,14 +25,11 @@ runtimes: - | if [ "$VERSION" = "8" ]; then JAVA_VERSION="1.8.0" - JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-amazon-corretto.x86_64" - else - JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-amazon-corretto" fi - - export JAVA_HOME + - export JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-amazon-corretto" - export JRE_HOME=$JAVA_HOME - export JDK_HOME=$JAVA_HOME - - yum -y install java-$JAVA_VERSION-amazon-corretto-devel + - yum --disablerepo="*" --enablerepo="AmazonCorretto" -y install java-$JAVA_VERSION-amazon-corretto-devel - | for tool_path in "$JAVA_HOME"/bin/*; do tool=`basename "$tool_path"` diff --git a/al2/x86_64/standard/5.0/Dockerfile b/al2/x86_64/standard/5.0/Dockerfile index ca43e18..8158902 100644 --- a/al2/x86_64/standard/5.0/Dockerfile +++ b/al2/x86_64/standard/5.0/Dockerfile @@ -36,7 +36,7 @@ RUN set -ex \ perl-DBI perl-HTTP-Date perl-TimeDate perl-YAML-LibYAML \ postgresql-devel procps-ng python-configobj readline-devel rsync sgml-common \ subversion-perl tar tcl tk vim wget which xfsprogs xmlto xorg-x11-server-Xvfb xz-devel \ - amazon-ecr-credential-helper git-lfs acl \ + amazon-ecr-credential-helper git-lfs acl glibc-langpack-en glibc-common \ && rm /etc/yum.repos.d/mono-centos7-stable.repo RUN useradd codebuild-user diff --git a/al2/x86_64/standard/5.0/runtimes.yml b/al2/x86_64/standard/5.0/runtimes.yml index 1b68849..c746b43 100644 --- a/al2/x86_64/standard/5.0/runtimes.yml +++ b/al2/x86_64/standard/5.0/runtimes.yml @@ -66,10 +66,10 @@ runtimes: default: commands: - echo "Installing custom Corretto(OpenJDK) version $VERSION ..." - - yum -y install java-$VERSION-amazon-corretto-devel.x86_64 - export JAVA_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" - - export JRE_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" - - export JDK_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto" + - export JRE_HOME=$JAVA_HOME + - export JDK_HOME=$JAVA_HOME + - yum --disablerepo="*" --enablerepo="AmazonCorretto" -y install java-$VERSION-amazon-corretto-devel - |- for tool_path in "$JAVA_HOME"/bin/*; do tool=`basename "$tool_path"`; diff --git a/ubuntu/standard/7.0/Dockerfile b/ubuntu/standard/7.0/Dockerfile index 464049a..26d7917 100644 --- a/ubuntu/standard/7.0/Dockerfile +++ b/ubuntu/standard/7.0/Dockerfile @@ -483,8 +483,7 @@ RUN set -ex \ ENV PATH "/usr/local/bin/sbt/bin:$PATH" RUN sbt version -Dsbt.rootdir=true # Cleanup -RUN rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && apt-get clean +RUN rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* && apt-get clean && apt-get update #**************** END JAVA **************************************************** #=======================End of stage: runtimes =================