Skip to content

feat: Add standard:8.0 image based on Ubuntu 24.04 #718

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

Open
wants to merge 5 commits into
base: master
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
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,35 @@ The master branch will sometimes have changes that are still in the process of b

### How to build Docker images

Steps to build Standard 7.0 image
Steps to build Standard 8.0 image

* Run `git clone https://github.com/aws/aws-codebuild-docker-images.git` to download this repository to your local machine
* Run `cd aws-codebuild-docker-images/ubuntu/standard/7.0` to change the directory in your local workspace. This is the location of the Standard 7.0 Dockerfile with Ubuntu base.
* Run `docker build -t aws/codebuild/standard:7.0 .` to build Docker image locally
* Run `cd aws-codebuild-docker-images/ubuntu/standard/8.0` to change the directory in your local workspace. This is the location of the Standard 8.0 Dockerfile with Ubuntu base.
* Run `docker build -t aws/codebuild/standard:8.0 .` to build Docker image locally

To poke around in the image interactively, build it and run:
`docker run -it --entrypoint sh aws/codebuild/standard:7.0 -c bash`
`docker run -it --entrypoint sh aws/codebuild/standard:8.0 -c bash`

To let the Docker daemon start up in the container, build it and run:
`docker run -it --privileged aws/codebuild/standard:7.0 bash`
`docker run -it --privileged aws/codebuild/standard:8.0 bash`

```
$ git clone https://github.com/aws/aws-codebuild-docker-images.git
$ cd aws-codebuild-docker-images
$ cd ubuntu/standard/7.0
$ docker build -t aws/codebuild/standard:7.0 .
$ docker run -it --entrypoint sh aws/codebuild/standard:7.0 -c bash
$ cd ubuntu/standard/8.0
$ docker build -t aws/codebuild/standard:8.0 .
$ docker run -it --entrypoint sh aws/codebuild/standard:8.0 -c bash
```

### Notice about ARM64/AArch64 Builds

* Some package providers (Google) do not ship ARM64 builds for Linux. If Dockerfile is built for ARM64, those packages are skipped
* SHA1 checksums for ARM64 artifacts are obviously different from the ones specified in the Dockerfile. The current version of Ubuntu standard 8.0 can
be built with the following command:
```bash
docker build . \
--build-arg DOCKER_SHA256=4da6a6c7502b7ab561675a5ff5ac192d9b49d76d0b8847cf17ade246122279f4 \
--build-arg POWERSHELL_DOWNLOAD_SHA=C0159B03E85F44AE1E7697818A011558DA6C813D0AAE848BF5AC13BF435D8624
```

### Image maintenance
Expand All @@ -37,6 +48,7 @@ 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)
+ [standard 8.0](ubuntu/standard/8.0)
+ [amazonlinux-x86_64-standard:4.0](al/x86_64/standard/4.0)
+ [amazonlinux-x86_64-standard:5.0](al/x86_64/standard/5.0)
+ [amazonlinux-x86_64-standard:corretto8](al/x86_64/standard/corretto8)
Expand Down
8 changes: 4 additions & 4 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
build:
commands:
- cd $CODEBUILD_SRC_DIR/ubuntu/standard/7.0
- docker build -t aws/codebuild/standard:7.0 .
- cd $CODEBUILD_SRC_DIR/al/x86_64/standard/5.0
- docker build -t aws/codebuild/amazonlinux-x86_64-standard:5.0 .
- cd $CODEBUILD_SRC_DIR/ubuntu/standard/8.0
- docker build -t aws/codebuild/standard:8.0 .
- cd $CODEBUILD_SRC_DIR/al2/x86_64/standard/5.0
- docker build -t aws/codebuild/amazonlinux2-x86_64-standard:5.0 .
634 changes: 634 additions & 0 deletions ubuntu/standard/8.0/Dockerfile

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions ubuntu/standard/8.0/amazon-ssm-agent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"Profile":{
"ShareCreds" : true,
"ShareProfile" : ""
},
"Mds": {
"CommandWorkersLimit" : 5,
"StopTimeoutMillis" : 20000,
"Endpoint": "",
"CommandRetryLimit": 15
},
"Ssm": {
"Endpoint": "",
"HealthFrequencyMinutes": 5,
"CustomInventoryDefaultLocation" : "",
"AssociationLogsRetentionDurationHours" : 24,
"RunCommandLogsRetentionDurationHours" : 336,
"SessionLogsRetentionDurationHours" : 336
},
"Mgs": {
"Region": "",
"Endpoint": "",
"StopTimeoutMillis" : 20000,
"SessionWorkersLimit" : 1000
},
"Agent": {
"Region": "",
"OrchestrationRootDir": "",
"ContainerMode": true
},
"Os": {
"Lang": "en-US",
"Name": "",
"Version": "1"
},
"S3": {
"Endpoint": "",
"Region": "",
"LogBucket":"",
"LogKey":""
},
"Kms": {
"Endpoint": ""
}
}
23 changes: 23 additions & 0 deletions ubuntu/standard/8.0/dockerd-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
set -e

/usr/local/bin/dockerd \
--host=unix:///var/run/docker.sock \
--host=tcp://127.0.0.1:2375 \
--storage-driver=overlay2 &>/var/log/docker.log &


tries=0
d_timeout=60
until docker info >/dev/null 2>&1
do
if [ "$tries" -gt "$d_timeout" ]; then
cat /var/log/docker.log
echo 'Timed out trying to connect to internal docker host.' >&2
exit 1
fi
tries=$(( $tries + 1 ))
sleep 1
done

eval "$@"
Loading