diff --git a/README.md b/README.md index 2ebbef25..40de7c70 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ The following images are actively maintained by AWS CodeBuild, and are listed in + [standard 5.0](ubuntu/standard/5.0) + [standard 6.0](ubuntu/standard/6.0) + [standard 7.0](ubuntu/standard/7.0) -+ [amazonlinux2-x86_64-standard:3.0](al2/x86_64/standard/3.0) + [amazonlinux2-x86_64-standard:4.0](al2/x86_64/standard/4.0) ++ [amazonlinux2-x86_64-standard:corretto8](al2/x86_64/standard/corretto8) ++ [amazonlinux2-x86_64-standard:corretto11](al2/x86_64/standard/corretto11) + [amazonlinux2-aarch64-standard:2.0](al2/aarch64/standard/2.0) + [amazonlinux2-aarch64-standard:3.0](al2/aarch64/standard/3.0) diff --git a/al2/x86_64/standard/corretto11/Dockerfile b/al2/x86_64/standard/corretto11/Dockerfile new file mode 100644 index 00000000..ec2f662a --- /dev/null +++ b/al2/x86_64/standard/corretto11/Dockerfile @@ -0,0 +1,62 @@ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://aws.amazon.com/asl/ +# +# or in the "license" file accompanying this file. +# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +FROM public.ecr.aws/amazoncorretto/amazoncorretto:11 + +# Install git, SSH, and other utilities +RUN set -ex \ + && yum update -y \ + && yum install -y -q openssh-clients tar gzip wget unzip perl\ + && mkdir ~/.ssh \ + && mkdir -p /opt/tools \ + && mkdir -p /codebuild/image/config \ + && touch ~/.ssh/known_hosts \ + && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \ + && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H bitbucket.org >> ~/.ssh/known_hosts \ + && chmod 600 ~/.ssh/known_hosts + +RUN useradd codebuild-user + +ARG MAVEN_HOME="/opt/maven" +ARG MAVEN_VERSION=3.9.1 +ARG MAVEN_CONFIG_HOME="/root/.m2" +ARG GRADLE_VERSION=8.1.1 +ARG GRADLE_PATH="/usr/local/gradle" + +RUN set -ex \ + # Install Maven + && mkdir -p $MAVEN_HOME \ + && curl -LSso /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && tar xzf /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz -C $MAVEN_HOME --strip-components=1 \ + && rm /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && update-alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 10000 \ + && mkdir -p $MAVEN_CONFIG_HOME \ + # Install Gradle + && mkdir -p $GRADLE_PATH \ + && wget -q "https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-all.zip" -O "$GRADLE_PATH/gradle-$GRADLE_VERSION-all.zip" \ + && unzip -q "$GRADLE_PATH/gradle-$GRADLE_VERSION-all.zip" -d /usr/local \ + && rm "$GRADLE_PATH/gradle-$GRADLE_VERSION-all.zip" \ + && mkdir "/tmp/gradle-$GRADLE_VERSION" \ + && "/usr/local/gradle-$GRADLE_VERSION/bin/gradle" -p "/tmp/gradle-$GRADLE_VERSION" init \ + && "/usr/local/gradle-$GRADLE_VERSION/bin/gradle" -p "/tmp/gradle-$GRADLE_VERSION" wrapper \ + && perl -pi -e "s/gradle-$GRADLE_VERSION-bin.zip/gradle-$GRADLE_VERSION-all.zip/" "/tmp/gradle-$GRADLE_VERSION/gradle/wrapper/gradle-wrapper.properties" \ + && "/tmp/gradle-$GRADLE_VERSION/gradlew" -p "/tmp/gradle-$GRADLE_VERSION" init \ + && rm -rf "/tmp/gradle-$GRADLE_VERSION" \ + # Install default GRADLE_VERSION to path + && ln -s /usr/local/gradle-$GRADLE_VERSION/bin/gradle /usr/bin/gradle \ + && rm -rf $GRADLE_PATH + +# Configure SSH +COPY ssh_config /root/.ssh/config +COPY runtimes.yml /codebuild/image/config/runtimes.yml +COPY legal/bill_of_material.txt /usr/share/doc/bill_of_material.txt + +ENTRYPOINT ["/bin/bash"] diff --git a/al2/x86_64/standard/corretto11/legal/bill_of_material.txt b/al2/x86_64/standard/corretto11/legal/bill_of_material.txt new file mode 100644 index 00000000..431f18d1 --- /dev/null +++ b/al2/x86_64/standard/corretto11/legal/bill_of_material.txt @@ -0,0 +1,19 @@ +The Amazon CodeBuild Product includes the following third-party software/licensing: + +---------------- +gzip : GPLv3+ and GFDL +---------------- +openssh-clients : BSD +---------------- +perl : Artistic +---------------- +tar : GPLv3+ +---------------- +wget : GPLv3+ +---------------- +unzip : http://www.info-zip.org/pub/infozip/license.html +---------------- +maven : Apache License, Version 2.0 +---------------- +gradle : Apache License, Version 2.0 +---------------- \ No newline at end of file diff --git a/al2/x86_64/standard/corretto11/runtimes.yml b/al2/x86_64/standard/corretto11/runtimes.yml new file mode 100644 index 00000000..2ddd89a9 --- /dev/null +++ b/al2/x86_64/standard/corretto11/runtimes.yml @@ -0,0 +1,8 @@ +version: 0.1 + +runtimes: + java: + versions: + corretto11: + commands: + - echo "Installing corretto(OpenJDK) version 11 ..." diff --git a/al2/x86_64/standard/3.0/ssh_config b/al2/x86_64/standard/corretto11/ssh_config similarity index 100% rename from al2/x86_64/standard/3.0/ssh_config rename to al2/x86_64/standard/corretto11/ssh_config diff --git a/al2/x86_64/standard/corretto8/Dockerfile b/al2/x86_64/standard/corretto8/Dockerfile new file mode 100644 index 00000000..d00ac6a2 --- /dev/null +++ b/al2/x86_64/standard/corretto8/Dockerfile @@ -0,0 +1,62 @@ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://aws.amazon.com/asl/ +# +# or in the "license" file accompanying this file. +# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +FROM public.ecr.aws/amazoncorretto/amazoncorretto:8 + +# Install git, SSH, and other utilities +RUN set -ex \ + && yum update -y \ + && yum install -y -q openssh-clients tar gzip wget unzip perl\ + && mkdir ~/.ssh \ + && mkdir -p /opt/tools \ + && mkdir -p /codebuild/image/config \ + && touch ~/.ssh/known_hosts \ + && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \ + && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H bitbucket.org >> ~/.ssh/known_hosts \ + && chmod 600 ~/.ssh/known_hosts + +RUN useradd codebuild-user + +ARG MAVEN_HOME="/opt/maven" +ARG MAVEN_VERSION=3.9.1 +ARG MAVEN_CONFIG_HOME="/root/.m2" +ARG GRADLE_VERSION=8.1.1 +ARG GRADLE_PATH="/usr/local/gradle" + +RUN set -ex \ + # Install Maven + && mkdir -p $MAVEN_HOME \ + && curl -LSso /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && tar xzf /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz -C $MAVEN_HOME --strip-components=1 \ + && rm /var/tmp/apache-maven-$MAVEN_VERSION-bin.tar.gz \ + && update-alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 10000 \ + && mkdir -p $MAVEN_CONFIG_HOME \ + # Install Gradle + && mkdir -p $GRADLE_PATH \ + && wget -q "https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-all.zip" -O "$GRADLE_PATH/gradle-$GRADLE_VERSION-all.zip" \ + && unzip -q "$GRADLE_PATH/gradle-$GRADLE_VERSION-all.zip" -d /usr/local \ + && rm "$GRADLE_PATH/gradle-$GRADLE_VERSION-all.zip" \ + && mkdir "/tmp/gradle-$GRADLE_VERSION" \ + && "/usr/local/gradle-$GRADLE_VERSION/bin/gradle" -p "/tmp/gradle-$GRADLE_VERSION" init \ + && "/usr/local/gradle-$GRADLE_VERSION/bin/gradle" -p "/tmp/gradle-$GRADLE_VERSION" wrapper \ + && perl -pi -e "s/gradle-$GRADLE_VERSION-bin.zip/gradle-$GRADLE_VERSION-all.zip/" "/tmp/gradle-$GRADLE_VERSION/gradle/wrapper/gradle-wrapper.properties" \ + && "/tmp/gradle-$GRADLE_VERSION/gradlew" -p "/tmp/gradle-$GRADLE_VERSION" init \ + && rm -rf "/tmp/gradle-$GRADLE_VERSION" \ + # Install default GRADLE_VERSION to path + && ln -s /usr/local/gradle-$GRADLE_VERSION/bin/gradle /usr/bin/gradle \ + && rm -rf $GRADLE_PATH + +# Configure SSH +COPY ssh_config /root/.ssh/config +COPY runtimes.yml /codebuild/image/config/runtimes.yml +COPY legal/bill_of_material.txt /usr/share/doc/bill_of_material.txt + +ENTRYPOINT ["/bin/bash"] diff --git a/al2/x86_64/standard/corretto8/legal/bill_of_material.txt b/al2/x86_64/standard/corretto8/legal/bill_of_material.txt new file mode 100644 index 00000000..431f18d1 --- /dev/null +++ b/al2/x86_64/standard/corretto8/legal/bill_of_material.txt @@ -0,0 +1,19 @@ +The Amazon CodeBuild Product includes the following third-party software/licensing: + +---------------- +gzip : GPLv3+ and GFDL +---------------- +openssh-clients : BSD +---------------- +perl : Artistic +---------------- +tar : GPLv3+ +---------------- +wget : GPLv3+ +---------------- +unzip : http://www.info-zip.org/pub/infozip/license.html +---------------- +maven : Apache License, Version 2.0 +---------------- +gradle : Apache License, Version 2.0 +---------------- \ No newline at end of file diff --git a/al2/x86_64/standard/corretto8/runtimes.yml b/al2/x86_64/standard/corretto8/runtimes.yml new file mode 100644 index 00000000..74912e64 --- /dev/null +++ b/al2/x86_64/standard/corretto8/runtimes.yml @@ -0,0 +1,9 @@ +version: 0.1 + +runtimes: + java: + versions: + corretto8: + commands: + - echo "Installing corretto(OpenJDK) version 8 ..." + diff --git a/al2/x86_64/standard/corretto8/ssh_config b/al2/x86_64/standard/corretto8/ssh_config new file mode 100644 index 00000000..710e2754 --- /dev/null +++ b/al2/x86_64/standard/corretto8/ssh_config @@ -0,0 +1,3 @@ +Host * + ConnectTimeout 10 + ConnectionAttempts 10 diff --git a/al2/x86_64/standard/3.0/Dockerfile b/unsupported_images/al2/x86_64/standard/3.0/Dockerfile similarity index 100% rename from al2/x86_64/standard/3.0/Dockerfile rename to unsupported_images/al2/x86_64/standard/3.0/Dockerfile diff --git a/al2/x86_64/standard/3.0/amazon-ssm-agent.json b/unsupported_images/al2/x86_64/standard/3.0/amazon-ssm-agent.json similarity index 100% rename from al2/x86_64/standard/3.0/amazon-ssm-agent.json rename to unsupported_images/al2/x86_64/standard/3.0/amazon-ssm-agent.json diff --git a/al2/x86_64/standard/3.0/dockerd-entrypoint.sh b/unsupported_images/al2/x86_64/standard/3.0/dockerd-entrypoint.sh similarity index 100% rename from al2/x86_64/standard/3.0/dockerd-entrypoint.sh rename to unsupported_images/al2/x86_64/standard/3.0/dockerd-entrypoint.sh diff --git a/al2/x86_64/standard/3.0/legal/THIRD_PARTY_LICENSES.txt b/unsupported_images/al2/x86_64/standard/3.0/legal/THIRD_PARTY_LICENSES.txt similarity index 100% rename from al2/x86_64/standard/3.0/legal/THIRD_PARTY_LICENSES.txt rename to unsupported_images/al2/x86_64/standard/3.0/legal/THIRD_PARTY_LICENSES.txt diff --git a/al2/x86_64/standard/3.0/legal/bill_of_material.txt b/unsupported_images/al2/x86_64/standard/3.0/legal/bill_of_material.txt similarity index 100% rename from al2/x86_64/standard/3.0/legal/bill_of_material.txt rename to unsupported_images/al2/x86_64/standard/3.0/legal/bill_of_material.txt diff --git a/al2/x86_64/standard/3.0/runtimes.yml b/unsupported_images/al2/x86_64/standard/3.0/runtimes.yml similarity index 100% rename from al2/x86_64/standard/3.0/runtimes.yml rename to unsupported_images/al2/x86_64/standard/3.0/runtimes.yml diff --git a/unsupported_images/al2/x86_64/standard/3.0/ssh_config b/unsupported_images/al2/x86_64/standard/3.0/ssh_config new file mode 100644 index 00000000..710e2754 --- /dev/null +++ b/unsupported_images/al2/x86_64/standard/3.0/ssh_config @@ -0,0 +1,3 @@ +Host * + ConnectTimeout 10 + ConnectionAttempts 10 diff --git a/al2/x86_64/standard/3.0/tools/android-accept-licenses.sh b/unsupported_images/al2/x86_64/standard/3.0/tools/android-accept-licenses.sh similarity index 100% rename from al2/x86_64/standard/3.0/tools/android-accept-licenses.sh rename to unsupported_images/al2/x86_64/standard/3.0/tools/android-accept-licenses.sh diff --git a/al2/x86_64/standard/3.0/tools/runtime_configs/php/7.3.33 b/unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/php/7.3.33 similarity index 100% rename from al2/x86_64/standard/3.0/tools/runtime_configs/php/7.3.33 rename to unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/php/7.3.33 diff --git a/al2/x86_64/standard/3.0/tools/runtime_configs/php/7.4.33 b/unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/php/7.4.33 similarity index 100% rename from al2/x86_64/standard/3.0/tools/runtime_configs/php/7.4.33 rename to unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/php/7.4.33 diff --git a/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.7.13 b/unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.7.13 similarity index 100% rename from al2/x86_64/standard/3.0/tools/runtime_configs/python/3.7.13 rename to unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.7.13 diff --git a/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.8.13 b/unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.8.13 similarity index 100% rename from al2/x86_64/standard/3.0/tools/runtime_configs/python/3.8.13 rename to unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.8.13 diff --git a/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.9.16 b/unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.9.16 similarity index 100% rename from al2/x86_64/standard/3.0/tools/runtime_configs/python/3.9.16 rename to unsupported_images/al2/x86_64/standard/3.0/tools/runtime_configs/python/3.9.16