ILocalBundling
- Implemented By: ILocalBundling
Local bundling.
Methods
| Name | Description |
|---|---|
try_bundle |
This method is called before attempting docker bundling to allow the bundler to be executed locally. |
try_bundle
def try_bundle(
output_dir: str,
image: DockerImage,
bundling_file_access: BundlingFileAccess = None,
command: typing.List[str] = None,
entrypoint: typing.List[str] = None,
environment: typing.Mapping[str] = None,
local: ILocalBundling = None,
network: str = None,
output_type: BundlingOutput = None,
platform: str = None,
security_opt: str = None,
user: str = None,
volumes: typing.List[DockerVolume] = None,
volumes_from: typing.List[str] = None,
working_directory: str = None
) -> bool
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 false.
- Type: str
the directory where the bundled asset should be output.
- Type: DockerImage
The Docker image where the command will run.
- Type: BundlingFileAccess
- Default: BundlingFileAccess.BIND_MOUNT
The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.
- Type: typing.List[str]
- Default: run the command defined in the image
The command to run in the Docker container.
Example value: ['npm', 'install']
- Type: typing.List[str]
- Default: run the entrypoint defined in the image
The entrypoint to run in the Docker container.
Example value: ['/bin/sh', '-c']
https://docs.docker.com/engine/reference/builder/#entrypoint
- Type: typing.Mapping[str]
- Default: no environment variables.
The environment variables to pass to the Docker container.
- Type: ILocalBundling
- Default: bundling will only be performed in a Docker container
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.
- Type: str
- Default: no networking options
Docker Networking options.
- Type: BundlingOutput
- Default: BundlingOutput.AUTO_DISCOVER
The type of output that this bundling operation is producing.
- Type: str
- Default: no platform specified (the current machine architecture will be used)
Platform to build for. Requires Docker Buildx.
Specify this property to build images on a specific platform.
- Type: str
- Default: no security options
Security configuration when running the docker container.
- Type: str
- Default: uid:gid of the current user or 1000:1000 on Windows
The user to use when running the Docker container.
user | user:group | uid | uid:gid | user:gid | uid:group
- Type: typing.List[DockerVolume]
- Default: no additional volumes are mounted
Additional Docker volumes to mount.
- Type: typing.List[str]
- Default: no containers are specified to mount volumes from
Where to mount the specified volumes from.
- Type: str
- Default: /asset-input
Working directory inside the Docker container.