BundlingOptions

class aws_cdk.core.BundlingOptions(*, image, command=None, environment=None, local=None, user=None, volumes=None, working_directory=None)

Bases: object

__init__(*, image, command=None, environment=None, local=None, user=None, volumes=None, working_directory=None)

Bundling options.

Parameters
  • image (BundlingDockerImage) – The Docker image where the command will run.

  • command (Optional[List[str]]) – The command to run in the Docker container. Default: - run the command defined in the image

  • environment (Optional[Mapping[str, str]]) – The environment variables to pass to the Docker container. Default: - no environment variables.

  • local (Optional[ILocalBundling]) – 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. Default: - bundling will only be performed in a Docker container

  • user (Optional[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

  • volumes (Optional[List[DockerVolume]]) – Additional Docker volumes to mount. Default: - no additional volumes are mounted

  • working_directory (Optional[str]) – Working directory inside the Docker container. Default: /asset-input

stability :stability: experimental

Return type

None

Attributes

command

The command to run in the Docker container.

default :default: - run the command defined in the image

see :see: https://docs.docker.com/engine/reference/run/ stability :stability: experimental

Example:

# Example automatically generated. See https://github.com/aws/jsii/issues/826
["npm", "install"]
Return type

Optional[List[str]]

environment

The environment variables to pass to the Docker container.

default :default: - no environment variables.

stability :stability: experimental

Return type

Optional[Mapping[str, str]]

image

The Docker image where the command will run.

stability :stability: experimental

Return type

BundlingDockerImage

local

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.

default :default: - bundling will only be performed in a Docker container

stability :stability: experimental

Return type

Optional[ILocalBundling]

user

The user to use when running the Docker container.

user | user:group | uid | uid:gid | user:gid | uid:group

default :default: - uid:gid of the current user or 1000:1000 on Windows

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

Return type

Optional[str]

volumes

Additional Docker volumes to mount.

default :default: - no additional volumes are mounted

stability :stability: experimental

Return type

Optional[List[DockerVolume]]

working_directory

Working directory inside the Docker container.

default :default: /asset-input

stability :stability: experimental

Return type

Optional[str]