BundlingOptions
Bundling options.
Initializer
import { BundlingOptions } from '@alicloud/ros-cdk-core'
const bundlingOptions: BundlingOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
image |
DockerImage |
The Docker image where the command will run. |
bundlingFileAccess |
BundlingFileAccess |
The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host. |
command |
string[] |
The command to run in the Docker container. |
entrypoint |
string[] |
The entrypoint to run in the Docker container. |
environment |
{[ key: string ]: string} |
The environment variables to pass to the Docker container. |
local |
ILocalBundling |
Local bundling provider. |
network |
string |
Docker Networking options. |
outputType |
BundlingOutput |
The type of output that this bundling operation is producing. |
platform |
string |
Platform to build for. Requires Docker Buildx. |
securityOpt |
string |
Security configuration when running the docker container. |
user |
string |
The user to use when running the Docker container. |
volumes |
DockerVolume[] |
Additional Docker volumes to mount. |
volumesFrom |
string[] |
Where to mount the specified volumes from. |
workingDirectory |
string |
Working directory inside the Docker container. |
image
Required
public readonly image: DockerImage;
- Type: DockerImage
The Docker image where the command will run.
bundlingFileAccess
Optional
public readonly bundlingFileAccess: BundlingFileAccess;
- 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.
command
Optional
public readonly command: string[];
- Type: string[]
- Default: run the command defined in the image
The command to run in the Docker container.
Example value: ['npm', 'install']
entrypoint
Optional
public readonly entrypoint: string[];
- Type: string[]
- 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
environment
Optional
public readonly environment: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: no environment variables.
The environment variables to pass to the Docker container.
local
Optional
public readonly local: ILocalBundling;
- 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.
network
Optional
public readonly network: string;
- Type: string
- Default: no networking options
Docker Networking options.
outputType
Optional
public readonly outputType: BundlingOutput;
- Type: BundlingOutput
- Default: BundlingOutput.AUTO_DISCOVER
The type of output that this bundling operation is producing.
platform
Optional
public readonly platform: string;
- Type: string
- 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.
securityOpt
Optional
public readonly securityOpt: string;
- Type: string
- Default: no security options
Security configuration when running the docker container.
user
Optional
public readonly user: string;
- Type: string
- 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
volumes
Optional
public readonly volumes: DockerVolume[];
- Type: DockerVolume[]
- Default: no additional volumes are mounted
Additional Docker volumes to mount.
volumesFrom
Optional
public readonly volumesFrom: string[];
- Type: string[]
- Default: no containers are specified to mount volumes from
Where to mount the specified volumes from.
workingDirectory
Optional
public readonly workingDirectory: string;
- Type: string
- Default: /asset-input
Working directory inside the Docker container.