Interface BundlingOptions

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:54.817Z") @Stability(Stable) public interface BundlingOptions extends
Bundling options.


 Asset asset = Asset.Builder.create(this, "BundledAsset")
         .path(join(__dirname, "markdown-asset")) // /asset-input and working directory in the container
                 .image(DockerImage.fromBuild(join(__dirname, "alpine-markdown"))) // Build an image
                 .command(List.of("sh", "-c", "\n            markdown > /asset-output/index.html\n          "))
  • Method Details

    • getImage

      @Stability(Stable) @NotNull DockerImage getImage()
      The Docker image where the command will run.
    • 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

    • getOutputType

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

      Default: BundlingOutput.AUTO_DISCOVER

    • 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

    • getWorkingDirectory

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

      Default: /asset-input

    • builder

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