Interface BundlingOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BundlingOptions.Jsii$Proxy
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forBundlingOptions
static final class
An implementation forBundlingOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic BundlingOptions.Builder
builder()
default BundlingFileAccess
The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.The command to run in the Docker container.The entrypoint to run in the Docker container.The environment variables to pass to the Docker container.getImage()
The Docker image where the command will run.default ILocalBundling
getLocal()
Local bundling provider.default String
Docker Networking options.default BundlingOutput
The type of output that this bundling operation is producing.default String
Platform to build for.default String
Security configuration when running the docker container.default String
getUser()
The user to use when running the Docker container.default List<DockerVolume>
Additional Docker volumes to mount.Where to mount the specified volumes from.default String
Working directory inside the Docker container.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getImage
The Docker image where the command will run. -
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
The command to run in the Docker container.Example value:
['npm', 'install']
Default: - run the command defined in the image
- See Also:
-
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
The environment variables to pass to the Docker container.Default: - no environment variables.
-
getLocal
Local bundling provider.The provider implements a method
tryBundle()
which should returntrue
if local bundling was performed. Iffalse
is returned, docker bundling will be done.Default: - bundling will only be performed in a Docker container
-
getNetwork
Docker Networking options.Default: - no networking options
-
getOutputType
The type of output that this bundling operation is producing.Default: BundlingOutput.AUTO_DISCOVER
-
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
Security configuration when running the docker container.Default: - no security options
-
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
Additional Docker volumes to mount.Default: - no additional volumes are mounted
-
getVolumesFrom
Where to mount the specified volumes from.Default: - no containers are specified to mount volumes from
- See Also:
-
getWorkingDirectory
Working directory inside the Docker container.Default: /asset-input
-
builder
- Returns:
- a
BundlingOptions.Builder
ofBundlingOptions
-