Skip to content
Merged
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
62 changes: 62 additions & 0 deletions al2/x86_64/standard/corretto11/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
19 changes: 19 additions & 0 deletions al2/x86_64/standard/corretto11/legal/bill_of_material.txt
Original file line number Diff line number Diff line change
@@ -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
----------------
8 changes: 8 additions & 0 deletions al2/x86_64/standard/corretto11/runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 0.1

runtimes:
java:
versions:
corretto11:
commands:
- echo "Installing corretto(OpenJDK) version 11 ..."
62 changes: 62 additions & 0 deletions al2/x86_64/standard/corretto8/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
19 changes: 19 additions & 0 deletions al2/x86_64/standard/corretto8/legal/bill_of_material.txt
Original file line number Diff line number Diff line change
@@ -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
----------------
9 changes: 9 additions & 0 deletions al2/x86_64/standard/corretto8/runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 0.1

runtimes:
java:
versions:
corretto8:
commands:
- echo "Installing corretto(OpenJDK) version 8 ..."

3 changes: 3 additions & 0 deletions al2/x86_64/standard/corretto8/ssh_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Host *
ConnectTimeout 10
ConnectionAttempts 10
3 changes: 3 additions & 0 deletions unsupported_images/al2/x86_64/standard/3.0/ssh_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Host *
ConnectTimeout 10
ConnectionAttempts 10