Interface DockerBuildOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
DockerBuildAssetOptions
All Known Implementing Classes:
DockerBuildAssetOptions.Jsii$Proxy, DockerBuildOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.022Z") @Stability(Stable) public interface DockerBuildOptions extends software.amazon.jsii.JsiiSerializable
Docker build options.

Example:

 Function.Builder.create(this, "Function")
         .code(Code.fromAsset("/path/to/handler", AssetOptions.builder()
                 .bundling(BundlingOptions.builder()
                         .image(DockerImage.fromBuild("/path/to/dir/with/DockerFile", DockerBuildOptions.builder()
                                 .buildArgs(Map.of(
                                         "ARG1", "value1"))
                                 .build()))
                         .command(List.of("my", "cool", "command"))
                         .build())
                 .build()))
         .runtime(Runtime.PYTHON_3_9)
         .handler("index.handler")
         .build();
 
  • Method Details

    • getBuildArgs

      @Stability(Stable) @Nullable default Map<String,String> getBuildArgs()
      Build args.

      Default: - no build args

    • getFile

      @Stability(Stable) @Nullable default String getFile()
      Name of the Dockerfile, must relative to the docker build path.

      Default: `Dockerfile`

    • getPlatform

      @Stability(Stable) @Nullable default String getPlatform()
      Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.

      Example value: linux/amd64

      Default: - no platform specified

    • builder

      @Stability(Stable) static DockerBuildOptions.Builder builder()
      Returns:
      a DockerBuildOptions.Builder of DockerBuildOptions