@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-28T21:34:13.867Z")
public interface BundlingOptions
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 java.util.List<java.lang.String> |
getCommand()
The command to run in the Docker container.
|
default java.util.List<java.lang.String> |
getEntrypoint()
The entrypoint to run in the Docker container.
|
default java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
The environment variables to pass to the Docker container.
|
DockerImage |
getImage()
The Docker image where the command will run.
|
default ILocalBundling |
getLocal()
Local bundling provider.
|
default BundlingOutput |
getOutputType()
The type of output that this bundling operation is producing.
|
default java.lang.String |
getSecurityOpt()
[Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
|
default java.lang.String |
getUser()
The user to use when running the Docker container.
|
default java.util.List<DockerVolume> |
getVolumes()
Additional Docker volumes to mount.
|
default java.lang.String |
getWorkingDirectory()
Working directory inside the Docker container.
|
DockerImage getImage()
default java.util.List<java.lang.String> getCommand()
Example value: ['npm', 'install']
Default: - run the command defined in the image
default java.util.List<java.lang.String> getEntrypoint()
Example value: ['/bin/sh', '-c']
Default: - run the entrypoint defined in the image
default java.util.Map<java.lang.String,java.lang.String> getEnvironment()
Default: - no environment variables.
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
default BundlingOutput getOutputType()
Default: BundlingOutput.AUTO_DISCOVER
default java.lang.String getSecurityOpt()
Default: - no security options
default java.lang.String getUser()
user | user:group | uid | uid:gid | user:gid | uid:group
Default: - uid:gid of the current user or 1000:1000 on Windows
default java.util.List<DockerVolume> getVolumes()
Default: - no additional volumes are mounted
default java.lang.String getWorkingDirectory()
Default: /asset-input
static BundlingOptions.Builder builder()
BundlingOptions.Builder
of BundlingOptions