Interface BundlingOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BundlingOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:05.262Z") @Stability(Stable) public interface BundlingOptions extends software.amazon.jsii.JsiiSerializable
Bundling options.

Example:

 import software.amazon.awscdk.*;
 Asset asset = Asset.Builder.create(this, "BundledAsset")
         .path("/path/to/asset")
         .bundling(BundlingOptions.builder()
                 .image(DockerImage.fromRegistry("alpine"))
                 .command(List.of("command-that-produces-an-archive.sh"))
                 .outputType(BundlingOutput.NOT_ARCHIVED)
                 .build())
         .build();
 
  • Method Details

    • getImage

      @Stability(Stable) @NotNull DockerImage getImage()
      The Docker image where the command will run.
    • getBundlingFileAccess

      @Stability(Stable) @Nullable default BundlingFileAccess getBundlingFileAccess()
      The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.

      Default: - BundlingFileAccess.BIND_MOUNT

    • getCommand

      @Stability(Stable) @Nullable default List<String> getCommand()
      The command to run in the Docker container.

      Example value: ['npm', 'install']

      Default: - run the command defined in the image

      See Also:
    • getEntrypoint

      @Stability(Stable) @Nullable default List<String> getEntrypoint()
      The entrypoint to run in the Docker container.

      Example value: ['/bin/sh', '-c']

      Default: - run the entrypoint defined in the image

      See Also:
    • getEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getEnvironment()
      The environment variables to pass to the Docker container.

      Default: - no environment variables.

    • getLocal

      @Stability(Stable) @Nullable default ILocalBundling getLocal()
      Local bundling provider.

      The provider implements a method tryBundle() which should return true if local bundling was performed. If false is returned, docker bundling will be done.

      Default: - bundling will only be performed in a Docker container

    • getNetwork

      @Stability(Stable) @Nullable default String getNetwork()
      Docker Networking options.

      Default: - no networking options

    • getOutputType

      @Stability(Stable) @Nullable default BundlingOutput getOutputType()
      The type of output that this bundling operation is producing.

      Default: BundlingOutput.AUTO_DISCOVER

    • getPlatform

      @Stability(Stable) @Nullable default String getPlatform()
      Platform to build for. Requires Docker Buildx.

      Specify this property to build images on a specific platform.

      Default: - no platform specified (the current machine architecture will be used)

    • getSecurityOpt

      @Stability(Stable) @Nullable default String getSecurityOpt()
      Security configuration when running the docker container.

      Default: - no security options

    • getUser

      @Stability(Stable) @Nullable default String getUser()
      The user to use when running the Docker container.

      user | user:group | uid | uid:gid | user:gid | uid:group

      Default: - uid:gid of the current user or 1000:1000 on Windows

      See Also:
    • getVolumes

      @Stability(Stable) @Nullable default List<DockerVolume> getVolumes()
      Additional Docker volumes to mount.

      Default: - no additional volumes are mounted

    • getVolumesFrom

      @Stability(Stable) @Nullable default List<String> getVolumesFrom()
      Where to mount the specified volumes from.

      Default: - no containers are specified to mount volumes from

      See Also:
    • getWorkingDirectory

      @Stability(Stable) @Nullable default String getWorkingDirectory()
      Working directory inside the Docker container.

      Default: /asset-input

    • builder

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