DockerImageSource
Properties for how to produce a Docker image from a source.
Initializer
import ros_cdk_assembly_schema
ros_cdk_assembly_schema.DockerImageSource(
cache_disabled: bool = None,
cache_from: typing.List[DockerCacheOption] = None,
cache_to: DockerCacheOption = None,
directory: str = None,
docker_build_args: typing.Mapping[str] = None,
docker_build_secrets: typing.Mapping[str] = None,
docker_build_ssh: str = None,
docker_build_target: str = None,
docker_file: str = None,
docker_outputs: typing.List[str] = None,
executable: typing.List[str] = None,
network_mode: str = None,
platform: str = None
)
Properties
Name | Type | Description |
---|---|---|
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. |
directory |
str |
The directory containing the Docker image build instructions. |
docker_build_args |
typing.Mapping[str] |
Additional build arguments. |
docker_build_secrets |
typing.Mapping[str] |
Additional build secrets. |
docker_build_ssh |
str |
SSH agent socket or keys. |
docker_build_target |
str |
Target build stage in a Dockerfile with multiple build stages. |
docker_file |
str |
The name of the file with build instructions. |
docker_outputs |
typing.List[str] |
Outputs. |
executable |
typing.List[str] |
A command-line executable that returns the name of a local Docker image on stdout after being run. |
network_mode |
str |
Networking mode for the RUN commands during build. Requires Docker Engine API v1.25+. |
platform |
str |
Platform to build for. Requires Docker Buildx. |
cache_disabled
Optional
cache_disabled: bool
- Type: bool
- Default: cache is used
Disable the cache and pass --no-cache
to the docker build
command.
cache_from
Optional
cache_from: typing.List[DockerCacheOption]
- Type: typing.List[DockerCacheOption]
- Default: no cache from options are passed to the build command
Cache from options to pass to the docker build
command.
cache_to
Optional
cache_to: DockerCacheOption
- Type: DockerCacheOption
- Default: no cache to options are passed to the build command
Cache to options to pass to the docker build
command.
directory
Optional
directory: str
- Type: str
- Default: Exactly one of
directory
andexecutable
is required
The directory containing the Docker image build instructions.
This path is relative to the asset manifest location.
docker_build_args
Optional
docker_build_args: typing.Mapping[str]
- Type: typing.Mapping[str]
- Default: No additional build arguments
Additional build arguments.
Only allowed when directory
is set.
docker_build_secrets
Optional
docker_build_secrets: typing.Mapping[str]
- Type: typing.Mapping[str]
- Default: No additional build secrets
Additional build secrets.
Only allowed when directory
is set.
docker_build_ssh
Optional
docker_build_ssh: str
- Type: str
- Default: No ssh flag is set
SSH agent socket or keys.
Requires building with docker buildkit.
docker_build_target
Optional
docker_build_target: str
- Type: str
- Default: The last stage in the Dockerfile
Target build stage in a Dockerfile with multiple build stages.
Only allowed when directory
is set.
docker_file
Optional
docker_file: str
- Type: str
- Default: "Dockerfile"
The name of the file with build instructions.
Only allowed when directory
is set.
docker_outputs
Optional
docker_outputs: typing.List[str]
- Type: typing.List[str]
- Default: no outputs are passed to the build command (default outputs are used)
Outputs.
https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs
executable
Optional
executable: typing.List[str]
- Type: typing.List[str]
- Default: Exactly one of
directory
andexecutable
is required
A command-line executable that returns the name of a local Docker image on stdout after being run.
network_mode
Optional
network_mode: str
- Type: str
- Default: no networking mode specified
Networking mode for the RUN commands during build. Requires Docker Engine API v1.25+.
Specify this property to build images on a specific networking mode.
platform
Optional
platform: str
- Type: str
- Default: current machine platform
Platform to build for. Requires Docker Buildx.
Specify this property to build images on a specific platform/architecture.