Skip to content

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.

imageRequired

public readonly image: DockerImage;

The Docker image where the command will run.


bundlingFileAccessOptional

public readonly 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.


commandOptional

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']

https://docs.docker.com/engine/reference/run/


entrypointOptional

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


environmentOptional

public readonly environment: {[ key: string ]: string};
  • Type: {[ key: string ]: string}
  • Default: no environment variables.

The environment variables to pass to the Docker container.


localOptional

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.


networkOptional

public readonly network: string;
  • Type: string
  • Default: no networking options

Docker Networking options.


outputTypeOptional

public readonly outputType: BundlingOutput;

The type of output that this bundling operation is producing.


platformOptional

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.


securityOptOptional

public readonly securityOpt: string;
  • Type: string
  • Default: no security options

Security configuration when running the docker container.


userOptional

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

https://docs.docker.com/engine/reference/run/#user


volumesOptional

public readonly volumes: DockerVolume[];
  • Type: DockerVolume[]
  • Default: no additional volumes are mounted

Additional Docker volumes to mount.


volumesFromOptional

public readonly volumesFrom: string[];
  • Type: string[]
  • Default: no containers are specified to mount volumes from

Where to mount the specified volumes from.

https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from


workingDirectoryOptional

public readonly workingDirectory: string;
  • Type: string
  • Default: /asset-input

Working directory inside the Docker container.