Docker images provided by CodeBuild - AWS CodeBuild

Docker images provided by CodeBuild

AWS CodeBuild manages the following Docker images that are available in the CodeBuild and AWS CodePipeline consoles.

Platform Image identifier Definition
Amazon Linux 2 aws/codebuild/amazonlinux2-x86_64-standard:2.0 al2/standard/2.0
Amazon Linux 2 aws/codebuild/amazonlinux2-x86_64-standard:3.0 al2/standard/3.0
Amazon Linux 2 aws/codebuild/amazonlinux2-aarch64-standard:1.0 al2/aarch64/standard/1.0
Amazon Linux 2 aws/codebuild/amazonlinux2-aarch64-standard:2.0 al2/aarch64/standard/2.0
Ubuntu 18.04 aws/codebuild/standard:3.0 ubuntu/standard/3.0
Ubuntu 18.04 aws/codebuild/standard:4.0 ubuntu/standard/4.0
Ubuntu 20.04 aws/codebuild/standard:5.0 ubuntu/standard/5.0
Windows Server Core 2019 aws/codebuild/windows-base:2019-1.0 N/A

The latest version of each image is cached. If you specify a more specific version, then CodeBuild provisions that version instead of the cached version. This can result in longer build times. For example, to benefit from caching, specify aws/codebuild/amazonlinux2-x86_64-standard:3.0 instead of a more granular version, such as aws/codebuild/amazonlinux2-x86_64-standard:3.0-1.0.0.

You can specify one or more runtimes in the runtime-versions section of your buildspec file. If your runtime is dependent upon another runtime, you can also specify its dependent runtime in the buildspec file. If you do not specify any runtimes in the buildspec file, CodeBuild chooses the default runtimes that are available in the image you use. If you specify one or more runtimes, CodeBuild uses only those runtimes. If a dependent runtime is not specified, CodeBuild attempts to choose the dependent runtime for you. For more information, see Specify runtime versions in the buildspec file.

The following table contains the available runtimes and the standard Linux images that support them.

Ubuntu and Amazon Linux 2 platform runtimes
Runtime name Version Images
android

28

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Ubuntu standard:3.0

Ubuntu standard:4.0

29

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Ubuntu standard:3.0

Ubuntu standard:4.0

dotnet

3.0

Amazon Linux 2 x86_64 standard:2.0

Ubuntu standard:3.0

3.1

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

Ubuntu standard:5.0

5.0

Ubuntu standard:5.0

golang

1.12

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

1.13

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

1.14

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

1.15

Ubuntu standard:5.0

nodejs

8

Amazon Linux 2 AArch64 standard:1.0

10

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

12

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

Ubuntu standard:5.0

14

Ubuntu standard:5.0

java

openjdk8

Ubuntu standard:3.0

openjdk11

Ubuntu standard:3.0

corretto8

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

Ubuntu standard:5.0

corretto11

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

Ubuntu standard:5.0

php

7.3

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

Ubuntu standard:5.0

7.4

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

Ubuntu standard:5.0

8.0

Ubuntu standard:5.0

python

3.7

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

Ubuntu standard:5.0

3.8

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

Ubuntu standard:5.0

3.9

Ubuntu standard:5.0

ruby

2.6

Amazon Linux 2 x86_64 standard:2.0

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:1.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:3.0

Ubuntu standard:4.0

Ubuntu standard:5.0

2.7

Amazon Linux 2 x86_64 standard:3.0

Amazon Linux 2 AArch64 standard:2.0

Ubuntu standard:4.0

Ubuntu standard:5.0

When you specify a runtime in the runtime-versions section of your buildspec file, you can specify a specific version, a specific major version and the latest minor version, or the latest version. The following table lists the available runtimes and how to specify them.

Ubuntu and Amazon Linux 2 platform runtime versions
Runtime name Version Specific version Specific major and latest minor version Latest version
android

28

android: 28

android: 28.x

android: latest

29

android: 29

android: 29.x

dotnet

3.0

dotnet: 3.0

dotnet: 3.x

dotnet: latest

3.1

dotnet: 3.1

5.0

dotnet: 5.0

dotnet: 5.x

golang

1.12

golang: 1.12

golang: 1.x

golang: latest

1.13

golang: 1.13

1.14

golang: 1.14

1.15

golang: 1.15

nodejs

8

nodejs: 8

nodejs: 8.x

nodejs: latest

10

nodejs: 10

nodejs: 10.x

12

nodejs: 12

nodejs: 12.x

14

nodejs: 14

nodejs: 14.x

java

openjdk8

java: openjdk8

java: openjdk8.x

java: latest

openjdk11

java: openjdk11

java: openjdk11.x

corretto8

java: corretto8

java: corretto8.x

corretto11

java: corretto11

java: corretto11.x

php

7.3

php: 7.3

php: 7.x

php: latest

7.4

php: 7.4

8.0

php: 8.0

php: 8.x

python

3.7

python: 3.7

python: 3.x

python: latest

3.8

python: 3.8

3.9

python: 3.9

ruby

2.6

ruby: 2.6

ruby: 2.x

ruby: latest

2.7

ruby: 2.7

Note

The aws/codebuild/amazonlinux2-aarch64-standard:1.0 image does not support the Android Runtime (ART).

The base image of the Windows Server Core 2019 contains the following runtimes.

Runtime name Version in windows-base:2019-1.0
dotnet 3.1.404

5.0

golang 1.14
nodejs 12.18
java corretto11
php 7.4.7
powershell 7.0.2
python 3.8.3
ruby 2.7

The base image of the Windows Server Core 2019 platform is only available in the following regions:

  • US East (N. Virginia)

  • US East (Ohio)

  • US West (Oregon)

  • Europe (Ireland)

You can use a build specification to install other components (for example, the AWS CLI, Apache Maven, Apache Ant, Mocha, RSpec, or similar) during the install build phase. For more information, see Buildspec example.

CodeBuild frequently updates the list of Docker images. To get the most current list, do one of the following:

  • In the CodeBuild console, in the Create build project wizard or Edit Build Project page, for Environment image, choose Managed image. Choose from the Operating system, Runtime, and Runtime version drop-down lists. For more information, see Create a build project (console) or Change a build project's settings (console).

  • For the AWS CLI, run the list-curated-environment-images command:

    aws codebuild list-curated-environment-images
  • For the AWS SDKs, call the ListCuratedEnvironmentImages operation for your target programming language. For more information, see the AWS SDKs and tools reference.