- class aws_cdk.ILocalBundling(*args, **kwds)
- try_bundle(output_dir, *, image, bundling_file_access=None, command=None, entrypoint=None, environment=None, local=None, network=None, output_type=None, platform=None, security_opt=None, user=None, volumes=None, volumes_from=None, working_directory=None)
This method is called before attempting docker bundling to allow the bundler to be executed locally.
If the local bundler exists, and bundling was performed locally, return
true. Otherwise, return
str) – the directory where the bundled asset should be output.
DockerImage) – The Docker image where the command will run.
BundlingFileAccess]) – 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
str]]) – The command to run in the Docker container. Example value:
['npm', 'install']Default: - run the command defined in the image
str]]) – The entrypoint to run in the Docker container. Example value:
['/bin/sh', '-c']Default: - run the entrypoint defined in the image
str]]) – The environment variables to pass to the Docker container. Default: - no environment variables.
ILocalBundling]) – Local bundling provider. The provider implements a method
tryBundle()which should return
trueif local bundling was performed. If
falseis returned, docker bundling will be done. Default: - bundling will only be performed in a Docker container
str]) – Docker Networking options. Default: - no networking options
BundlingOutput]) – The type of output that this bundling operation is producing. Default: BundlingOutput.AUTO_DISCOVER
str]) – 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)
str]) – Security configuration when running the docker container. Default: - no security options
str]) – 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
Any]]]]) – Additional Docker volumes to mount. Default: - no additional volumes are mounted
str]]) – Where to mount the specified volumes from. Default: - no containers are specified to mount volumes from
str]) – Working directory inside the Docker container. Default: /asset-input
- Return type: