@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:40.343Z") @Stability(value=Experimental) public interface BundlingOptions extends software.amazon.jsii.JsiiSerializable
Example:
Asset asset = Asset.Builder.create(this, "BundledAsset")
.path(join(__dirname, "markdown-asset")) // /asset-input and working directory in the container
.bundling(BundlingOptions.builder()
.image(DockerImage.fromBuild(join(__dirname, "alpine-markdown"))) // Build an image
.command(List.of("sh", "-c", "\n markdown index.md > /asset-output/index.html\n "))
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
BundlingOptions.Builder
A builder for
BundlingOptions |
static class |
BundlingOptions.Jsii$Proxy
An implementation for
BundlingOptions |
| Modifier and Type | Method and Description |
|---|---|
static BundlingOptions.Builder |
builder() |
default List<String> |
getCommand()
(experimental) The command to run in the Docker container.
|
default List<String> |
getEntrypoint()
(experimental) The entrypoint to run in the Docker container.
|
default Map<String,String> |
getEnvironment()
(experimental) The environment variables to pass to the Docker container.
|
DockerImage |
getImage()
(experimental) The Docker image where the command will run.
|
default ILocalBundling |
getLocal()
(experimental) Local bundling provider.
|
default BundlingOutput |
getOutputType()
(experimental) The type of output that this bundling operation is producing.
|
default String |
getSecurityOpt()
(experimental) [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
|
default String |
getUser()
(experimental) The user to use when running the Docker container.
|
default List<DockerVolume> |
getVolumes()
(experimental) Additional Docker volumes to mount.
|
default String |
getWorkingDirectory()
(experimental) Working directory inside the Docker container.
|
@Stability(value=Experimental) @NotNull DockerImage getImage()
@Stability(value=Experimental) @Nullable default List<String> getCommand()
Example value: ['npm', 'install']
Default: - run the command defined in the image
@Stability(value=Experimental) @Nullable default List<String> getEntrypoint()
Example value: ['/bin/sh', '-c']
Default: - run the entrypoint defined in the image
@Stability(value=Experimental) @Nullable default Map<String,String> getEnvironment()
Default: - no environment variables.
@Stability(value=Experimental) @Nullable default ILocalBundling getLocal()
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
@Stability(value=Experimental) @Nullable default BundlingOutput getOutputType()
Default: BundlingOutput.AUTO_DISCOVER
@Stability(value=Experimental) @Nullable default String getSecurityOpt()
Default: - no security options
@Stability(value=Experimental) @Nullable default String getUser()
user | user:group | uid | uid:gid | user:gid | uid:group
Default: - uid:gid of the current user or 1000:1000 on Windows
@Stability(value=Experimental) @Nullable default List<DockerVolume> getVolumes()
Default: - no additional volumes are mounted
@Stability(value=Experimental) @Nullable default String getWorkingDirectory()
Default: /asset-input
@Stability(value=Experimental) static BundlingOptions.Builder builder()
BundlingOptions.Builder of BundlingOptionsCopyright © 2022. All rights reserved.