Skip to content

BundlingOptions

Bundling options.

Initializer

import ros_cdk_core
ros_cdk_core.BundlingOptions(
  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
)

Properties

Name Type Description
image DockerImage The Docker image where the command will run.
bundling_file_access 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 typing.List[str] The command to run in the Docker container.
entrypoint typing.List[str] The entrypoint to run in the Docker container.
environment typing.Mapping[str] The environment variables to pass to the Docker container.
local ILocalBundling Local bundling provider.
network str Docker Networking options.
output_type BundlingOutput The type of output that this bundling operation is producing.
platform str Platform to build for. Requires Docker Buildx.
security_opt str Security configuration when running the docker container.
user str The user to use when running the Docker container.
volumes typing.List[DockerVolume] Additional Docker volumes to mount.
volumes_from typing.List[str] Where to mount the specified volumes from.
working_directory str Working directory inside the Docker container.

imageRequired

image: DockerImage

The Docker image where the command will run.


bundling_file_accessOptional

bundling_file_access: 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

command: typing.List[str]
  • Type: typing.List[str]
  • 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

entrypoint: typing.List[str]
  • 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


environmentOptional

environment: typing.Mapping[str]
  • Type: typing.Mapping[str]
  • Default: no environment variables.

The environment variables to pass to the Docker container.


localOptional

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

network: str
  • Type: str
  • Default: no networking options

Docker Networking options.


output_typeOptional

output_type: BundlingOutput

The type of output that this bundling operation is producing.


platformOptional

platform: str
  • 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.


security_optOptional

security_opt: str
  • Type: str
  • Default: no security options

Security configuration when running the docker container.


userOptional

user: str
  • 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

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


volumesOptional

volumes: typing.List[DockerVolume]
  • Type: typing.List[DockerVolume]
  • Default: no additional volumes are mounted

Additional Docker volumes to mount.


volumes_fromOptional

volumes_from: typing.List[str]
  • Type: typing.List[str]
  • 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


working_directoryOptional

working_directory: str
  • Type: str
  • Default: /asset-input

Working directory inside the Docker container.