Skip to content

DockerBuildOptions

Docker build options.

Initializer

import ros_cdk_core
ros_cdk_core.DockerBuildOptions(
  build_args: typing.Mapping[str] = None,
  cache_disabled: bool = None,
  cache_from: typing.List[DockerCacheOption] = None,
  cache_to: DockerCacheOption = None,
  file: str = None,
  platform: str = None,
  target_stage: str = None
)

Properties

Name Type Description
build_args typing.Mapping[str] Build args.
cache_disabled bool Disable the cache and pass --no-cache to the docker build command.
cache_from typing.List[DockerCacheOption] Cache from options to pass to the docker build command.
cache_to DockerCacheOption Cache to options to pass to the docker build command.
file str Name of the Dockerfile, must relative to the docker build path.
platform str Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
target_stage str Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.

build_argsOptional

build_args: typing.Mapping[str]
  • Type: typing.Mapping[str]
  • Default: no build args

Build args.


cache_disabledOptional

cache_disabled: bool
  • Type: bool
  • Default: cache is used

Disable the cache and pass --no-cache to the docker build command.


cache_fromOptional

cache_from: typing.List[DockerCacheOption]

Cache from options to pass to the docker build command.


cache_toOptional

cache_to: DockerCacheOption

Cache to options to pass to the docker build command.


fileOptional

file: str
  • Type: str
  • Default: Dockerfile

Name of the Dockerfile, must relative to the docker build path.


platformOptional

platform: str
  • Type: str
  • Default: no platform specified

Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.

Example value: linux/amd64


target_stageOptional

target_stage: str
  • Type: str
  • Default: Build all stages defined in the Dockerfile

Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.

Example value: build-env