DockerImageSource Struct
Properties for how to produce a Docker image from a source.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const dockerImageSource: cloud_assembly_schema.DockerImageSource = {
cacheDisabled: false,
cacheFrom: [{
type: 'type',
// the properties below are optional
params: {
paramsKey: 'params',
},
}],
cacheTo: {
type: 'type',
// the properties below are optional
params: {
paramsKey: 'params',
},
},
directory: 'directory',
dockerBuildArgs: {
dockerBuildArgsKey: 'dockerBuildArgs',
},
dockerBuildContexts: {
dockerBuildContextsKey: 'dockerBuildContexts',
},
dockerBuildSecrets: {
dockerBuildSecretsKey: 'dockerBuildSecrets',
},
dockerBuildSsh: 'dockerBuildSsh',
dockerBuildTarget: 'dockerBuildTarget',
dockerFile: 'dockerFile',
dockerOutputs: ['dockerOutputs'],
executable: ['executable'],
networkMode: 'networkMode',
platform: 'platform',
};
Properties
Default: cache is used
cacheFromDockerCacheOption[]cache_fromtyping.List[DockerCacheOption]cacheFromList<DockerCacheOption>CacheFromDockerCacheOption[]CacheFrom*[]DockerCacheOption#Default: no cache from options are passed to the build command
cacheToDockerCacheOptioncache_toDockerCacheOptioncacheToDockerCacheOptionCacheToDockerCacheOptionCacheToDockerCacheOption#Default: no cache to options are passed to the build command
Default: Exactly one of directory and executable is required
This path is relative to the asset manifest location.
dockerBuildArgs{ [key: string]: string }docker_build_argstyping.Mapping[str, str]dockerBuildArgsMap<String, String>DockerBuildArgsIDictionary<string, string>DockerBuildArgs*map[string]*string#Default: No additional build arguments
Only allowed when directory is set.
dockerBuildContexts{ [key: string]: string }docker_build_contextstyping.Mapping[str, str]dockerBuildContextsMap<String, String>DockerBuildContextsIDictionary<string, string>DockerBuildContexts*map[string]*string#Default: No additional build contexts
Only allowed when directory is set.
dockerBuildSecrets{ [key: string]: string }docker_build_secretstyping.Mapping[str, str]dockerBuildSecretsMap<String, String>DockerBuildSecretsIDictionary<string, string>DockerBuildSecrets*map[string]*string#Default: No additional build secrets
Only allowed when directory is set.
dockerBuildSshstringdocker_build_sshstrdockerBuildSshStringDockerBuildSshstringDockerBuildSsh*string#Default: No ssh flag is set
Requires building with docker buildkit.
dockerBuildTargetstringdocker_build_targetstrdockerBuildTargetStringDockerBuildTargetstringDockerBuildTarget*string#Default: The last stage in the Dockerfile
Only allowed when directory is set.
Only allowed when directory is set.
dockerOutputsstring[]docker_outputstyping.List[str]dockerOutputsList<String>DockerOutputsstring[]DockerOutputs*[]*string#Default: no outputs are passed to the build command (default outputs are used)
executablestring[]executabletyping.List[str]executableList<String>Executablestring[]Executable*[]*string#Default: Exactly one of directory and executable is required
Default: no networking mode specified
Specify this property to build images on a specific networking mode.
Default: current machine platform
Specify this property to build images on a specific platform/architecture.