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
cacheDisabledoptionalbooleancache_disabledoptionalboolcacheDisabledoptionalBooleanCacheDisabledoptionalboolCacheDisabledoptional*bool#Default: cache is used
cacheFromoptionalDockerCacheOption[]cache_fromoptionaltyping.List[DockerCacheOption]cacheFromoptionalList<DockerCacheOption>CacheFromoptionalDockerCacheOption[]CacheFromoptional*[]DockerCacheOption#Default: no cache from options are passed to the build command
cacheTooptionalDockerCacheOptioncache_tooptionalDockerCacheOptioncacheTooptionalDockerCacheOptionCacheTooptionalDockerCacheOptionCacheTooptionalDockerCacheOption#Default: no cache to options are passed to the build command
directoryoptionalstringdirectoryoptionalstrdirectoryoptionalStringDirectoryoptionalstringDirectoryoptional*string#Default: Exactly one of directory and executable is required
This path is relative to the asset manifest location.
dockerBuildArgsoptional{ [key: string]: string }docker_build_argsoptionaltyping.Mapping[str, str]dockerBuildArgsoptionalMap<String, String>DockerBuildArgsoptionalIDictionary<string, string>DockerBuildArgsoptional*map[string]*string#Default: No additional build arguments
Only allowed when directory is set.
dockerBuildContextsoptional{ [key: string]: string }docker_build_contextsoptionaltyping.Mapping[str, str]dockerBuildContextsoptionalMap<String, String>DockerBuildContextsoptionalIDictionary<string, string>DockerBuildContextsoptional*map[string]*string#Default: No additional build contexts
Only allowed when directory is set.
dockerBuildSecretsoptional{ [key: string]: string }docker_build_secretsoptionaltyping.Mapping[str, str]dockerBuildSecretsoptionalMap<String, String>DockerBuildSecretsoptionalIDictionary<string, string>DockerBuildSecretsoptional*map[string]*string#Default: No additional build secrets
Only allowed when directory is set.
dockerBuildSshoptionalstringdocker_build_sshoptionalstrdockerBuildSshoptionalStringDockerBuildSshoptionalstringDockerBuildSshoptional*string#Default: No ssh flag is set
Requires building with docker buildkit.
dockerBuildTargetoptionalstringdocker_build_targetoptionalstrdockerBuildTargetoptionalStringDockerBuildTargetoptionalstringDockerBuildTargetoptional*string#Default: The last stage in the Dockerfile
Only allowed when directory is set.
dockerFileoptionalstringdocker_fileoptionalstrdockerFileoptionalStringDockerFileoptionalstringDockerFileoptional*string= "Dockerfile"#Only allowed when directory is set.
dockerOutputsoptionalstring[]docker_outputsoptionaltyping.List[str]dockerOutputsoptionalList<String>DockerOutputsoptionalstring[]DockerOutputsoptional*[]*string#Default: no outputs are passed to the build command (default outputs are used)
executableoptionalstring[]executableoptionaltyping.List[str]executableoptionalList<String>Executableoptionalstring[]Executableoptional*[]*string#Default: Exactly one of directory and executable is required
networkModeoptionalstringnetwork_modeoptionalstrnetworkModeoptionalStringNetworkModeoptionalstringNetworkModeoptional*string#Default: no networking mode specified
Specify this property to build images on a specific networking mode.
platformoptionalstringplatformoptionalstrplatformoptionalStringPlatformoptionalstringPlatformoptional*string#Default: current machine platform
Specify this property to build images on a specific platform/architecture.