BundlingOptions

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

Bases: object

(experimental) Bundling options.

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

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

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

  • local (Optional[ILocalBundling]) – (experimental) 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]) – (experimental) 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]]) – (experimental) Additional Docker volumes to mount. Default: - no additional volumes are mounted

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

Stability

experimental

Attributes

command

(experimental) The command to run in the Docker container.

Default
  • run the command defined in the image

See

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

Stability

experimental

Example:

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

Optional[List[str]]

environment

(experimental) The environment variables to pass to the Docker container.

Default
  • no environment variables.

Stability

experimental

Return type

Optional[Mapping[str, str]]

image

(experimental) The Docker image where the command will run.

Stability

experimental

Return type

BundlingDockerImage

local

(experimental) 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

Stability

experimental

Return type

Optional[ILocalBundling]

user

(experimental) 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

See

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

Stability

experimental

Return type

Optional[str]

volumes

(experimental) Additional Docker volumes to mount.

Default
  • no additional volumes are mounted

Stability

experimental

Return type

Optional[List[DockerVolume]]

working_directory

(experimental) Working directory inside the Docker container.

Default

/asset-input

Stability

experimental

Return type

Optional[str]