DockerImageSource
- class aws_cdk.cloud_assembly_schema.DockerImageSource(*, cache_disabled=None, cache_from=None, cache_to=None, directory=None, docker_build_args=None, docker_build_secrets=None, docker_build_ssh=None, docker_build_target=None, docker_file=None, docker_outputs=None, executable=None, network_mode=None, platform=None)
Bases:
objectProperties for how to produce a Docker image from a source.
- Parameters:
cache_disabled (
Optional[bool]) – Disable the cache and pass--no-cacheto thedocker buildcommand. Default: - cache is usedcache_from (
Optional[Sequence[Union[DockerCacheOption,Dict[str,Any]]]]) – Cache from options to pass to thedocker buildcommand. Default: - no cache from options are passed to the build commandcache_to (
Union[DockerCacheOption,Dict[str,Any],None]) – Cache to options to pass to thedocker buildcommand. Default: - no cache to options are passed to the build commanddirectory (
Optional[str]) – The directory containing the Docker image build instructions. This path is relative to the asset manifest location. Default: - Exactly one ofdirectoryandexecutableis requireddocker_build_args (
Optional[Mapping[str,str]]) – Additional build arguments. Only allowed whendirectoryis set. Default: - No additional build argumentsdocker_build_secrets (
Optional[Mapping[str,str]]) – Additional build secrets. Only allowed whendirectoryis set. Default: - No additional build secretsdocker_build_ssh (
Optional[str]) – SSH agent socket or keys. Requires building with docker buildkit. Default: - No ssh flag is setdocker_build_target (
Optional[str]) – Target build stage in a Dockerfile with multiple build stages. Only allowed whendirectoryis set. Default: - The last stage in the Dockerfiledocker_file (
Optional[str]) – The name of the file with build instructions. Only allowed whendirectoryis set. Default: “Dockerfile”docker_outputs (
Optional[Sequence[str]]) – Outputs. Default: - no outputs are passed to the build command (default outputs are used)executable (
Optional[Sequence[str]]) – A command-line executable that returns the name of a local Docker image on stdout after being run. Default: - Exactly one ofdirectoryandexecutableis requirednetwork_mode (
Optional[str]) – 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. Default: - no networking mode specifiedplatform (
Optional[str]) – Platform to build for. Requires Docker Buildx. Specify this property to build images on a specific platform/architecture. Default: - current machine platform
Attributes
- cache_disabled
Disable the cache and pass
--no-cacheto thedocker buildcommand.- Default:
cache is used
- cache_from
Cache from options to pass to the
docker buildcommand.- Default:
no cache from options are passed to the build command
- See:
- cache_to
Cache to options to pass to the
docker buildcommand.- Default:
no cache to options are passed to the build command
- See:
- directory
The directory containing the Docker image build instructions.
This path is relative to the asset manifest location.
- Default:
Exactly one of
directoryandexecutableis required
- docker_build_args
Additional build arguments.
Only allowed when
directoryis set.- Default:
No additional build arguments
- docker_build_secrets
Additional build secrets.
Only allowed when
directoryis set.- Default:
No additional build secrets
- docker_build_ssh
SSH agent socket or keys.
Requires building with docker buildkit.
- Default:
No ssh flag is set
- docker_build_target
Target build stage in a Dockerfile with multiple build stages.
Only allowed when
directoryis set.- Default:
The last stage in the Dockerfile
- docker_file
The name of the file with build instructions.
Only allowed when
directoryis set.- Default:
“Dockerfile”
- docker_outputs
Outputs.
- Default:
no outputs are passed to the build command (default outputs are used)
- See:
https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs
- executable
A command-line executable that returns the name of a local Docker image on stdout after being run.
- Default:
Exactly one of
directoryandexecutableis required
- network_mode
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.
- Default:
no networking mode specified
- platform
Platform to build for. Requires Docker Buildx.
Specify this property to build images on a specific platform/architecture.
- Default:
current machine platform