Menu
AWS CodeBuild
User Guide (API Version 2016-10-06)

Build Environment Reference for AWS CodeBuild

When you call AWS CodeBuild to run a build, you must provide information about the build environment AWS CodeBuild will use. A build environment represents a combination of operating system, programming language runtime, and tools that AWS CodeBuild uses to run a build. For information about how a build environment works, see How AWS CodeBuild Works.

A build environment contains a Docker image. For information, see "Docker images" in Understanding the architecture on the Docker Docs website.

When you provide information to AWS CodeBuild about the build environment, you specify the identifier of a Docker image in a supported repository type. These include the AWS CodeBuild Docker image repository, publicly available images in Docker Hub, and Amazon EC2 Container Registry (Amazon ECR) repositories in your AWS account:

  • We recommend that you use Docker images stored in the AWS CodeBuild Docker image repository, because they are optimized for use with the service. For more information, see Docker Images Provided by AWS CodeBuild.

  • To get the identifier of a publicly available Docker image stored in Docker Hub, see Searching for images on the Docker Docs website.

  • To learn how to work with Docker images stored in Amazon ECR repositories in your AWS account, see our Amazon ECR Sample.

In addition to a Docker image identifier, you also specify a set of computing resources that the build environment will use. For more information, see Build Environment Compute Types.