Interface DockerBuildOptions

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
DockerBuildAssetOptions.Jsii$Proxy, DockerBuildOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:46.230Z") @Stability(Stable) public interface DockerBuildOptions extends
Docker build options.


 Function.Builder.create(this, "Function")
         .code(Code.fromAsset("/path/to/handler", AssetOptions.builder()
                         .image(DockerImage.fromBuild("/path/to/dir/with/DockerFile", DockerBuildOptions.builder()
                                         "ARG1", "value1"))
                         .command(List.of("my", "cool", "command"))
  • Method Details

    • getBuildArgs

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

      Default: - no build args

    • getCacheDisabled

      @Stability(Stable) @Nullable default Boolean getCacheDisabled()
      Disable the cache and pass --no-cache to the docker build command.

      Default: - cache is used

    • getCacheFrom

      @Stability(Stable) @Nullable default List<DockerCacheOption> getCacheFrom()
      Cache from options to pass to the docker build command.

      Default: - no cache from args are passed

    • getCacheTo

      @Stability(Stable) @Nullable default DockerCacheOption getCacheTo()
      Cache to options to pass to the docker build command.

      Default: - no cache to args are passed

    • 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

    • getTargetStage

      @Stability(Stable) @Nullable default String getTargetStage()
      Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.

      Example value: build-env

      Default: - Build all stages defined in the Dockerfile

    • builder

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