Class LinuxBuildImage

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codebuild.LinuxBuildImage
All Implemented Interfaces:
IBuildImage, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.822Z") @Stability(Stable) public class LinuxBuildImage extends software.amazon.jsii.JsiiObject implements IBuildImage
A CodeBuild image running x86-64 Linux.

This class has a bunch of public constants that represent the most popular images.

You can also specify a custom image using one of the static methods:

  • LinuxBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }])
  • LinuxBuildImage.fromEcrRepository(repo[, tag])
  • LinuxBuildImage.fromAsset(parent, id, props)

Example:

 CodePipeline pipeline = CodePipeline.Builder.create(this, "Pipeline")
         .synth(ShellStep.Builder.create("Synth")
                 .input(CodePipelineSource.connection("my-org/my-app", "main", ConnectionSourceOptions.builder()
                         .connectionArn("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41")
                         .build()))
                 .commands(List.of("npm ci", "npm run build", "npx cdk synth"))
                 .build())
         // Turn this on because the pipeline uses Docker image assets
         .dockerEnabledForSelfMutation(true)
         .build();
 pipeline.addWave("MyWave", WaveOptions.builder()
         .post(List.of(
             CodeBuildStep.Builder.create("RunApproval")
                     .commands(List.of("command-from-image"))
                     .buildEnvironment(BuildEnvironment.builder()
                             // The user of a Docker image asset in the pipeline requires turning on
                             // 'dockerEnabledForSelfMutation'.
                             .buildImage(LinuxBuildImage.fromAsset(this, "Image", DockerImageAssetProps.builder()
                                     .directory("./docker-image")
                                     .build()))
                             .build())
                     .build()))
         .build());
 

See Also:
  • Field Details

    • AMAZON_LINUX_2

      @Stability(Stable) public static final IBuildImage AMAZON_LINUX_2
    • AMAZON_LINUX_2_2

      @Stability(Stable) public static final IBuildImage AMAZON_LINUX_2_2
    • AMAZON_LINUX_2_3

      @Stability(Stable) public static final IBuildImage AMAZON_LINUX_2_3
      The Amazon Linux 2 x86_64 standard image, version 3.0.
    • AMAZON_LINUX_2_ARM

      @Stability(Deprecated) @Deprecated public static final IBuildImage AMAZON_LINUX_2_ARM
      Deprecated.
      Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead.
    • AMAZON_LINUX_2_ARM_2

      @Stability(Deprecated) @Deprecated public static final IBuildImage AMAZON_LINUX_2_ARM_2
      Deprecated.
      Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0 instead.
      (deprecated) Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".

    • STANDARD_1_0

      @Stability(Stable) public static final IBuildImage STANDARD_1_0
    • STANDARD_2_0

      @Stability(Stable) public static final IBuildImage STANDARD_2_0
    • STANDARD_3_0

      @Stability(Stable) public static final IBuildImage STANDARD_3_0
    • STANDARD_4_0

      @Stability(Stable) public static final IBuildImage STANDARD_4_0
      The aws/codebuild/standard:4.0 build image.
    • STANDARD_5_0

      @Stability(Stable) public static final IBuildImage STANDARD_5_0
      The aws/codebuild/standard:5.0 build image.
    • UBUNTU_14_04_ANDROID_JAVA8_24_4_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_ANDROID_JAVA8_24_4_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_ANDROID_JAVA8_26_1_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_ANDROID_JAVA8_26_1_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_BASE

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_BASE
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_DOCKER_17_09_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOCKER_17_09_0
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_DOCKER_18_09_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOCKER_18_09_0
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_DOTNET_CORE_1_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOTNET_CORE_1_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_DOTNET_CORE_2_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOTNET_CORE_2_0
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_DOTNET_CORE_2_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOTNET_CORE_2_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_GOLANG_1_10

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_GOLANG_1_10
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_GOLANG_1_11

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_GOLANG_1_11
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_NODEJS_10_1_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_10_1_0
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_NODEJS_10_14_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_10_14_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_NODEJS_6_3_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_6_3_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_NODEJS_8_11_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_8_11_0
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_OPEN_JDK_11

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_OPEN_JDK_11
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_OPEN_JDK_8

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_OPEN_JDK_8
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_OPEN_JDK_9

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_OPEN_JDK_9
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PHP_5_6

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PHP_5_6
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PHP_7_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PHP_7_0
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PHP_7_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PHP_7_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PYTHON_2_7_12

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_2_7_12
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PYTHON_3_3_6

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_3_6
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PYTHON_3_4_5

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_4_5
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PYTHON_3_5_2

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_5_2
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PYTHON_3_6_5

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_6_5
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_PYTHON_3_7_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_7_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_RUBY_2_2_5

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_2_5
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_RUBY_2_3_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_3_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_RUBY_2_5_1

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_5_1
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
    • UBUNTU_14_04_RUBY_2_5_3

      @Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_5_3
      Deprecated.
      Use STANDARD_2_0 and specify runtime in buildspec runtime-versions section
  • Constructor Details

    • LinuxBuildImage

      protected LinuxBuildImage(software.amazon.jsii.JsiiObjectRef objRef)
    • LinuxBuildImage

      protected LinuxBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details