Interface DockerImageSource
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DockerImageSource.Jsii$Proxy
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;
DockerImageSource dockerImageSource = DockerImageSource.builder()
.cacheDisabled(false)
.cacheFrom(List.of(DockerCacheOption.builder()
.type("type")
// the properties below are optional
.params(Map.of(
"paramsKey", "params"))
.build()))
.cacheTo(DockerCacheOption.builder()
.type("type")
// the properties below are optional
.params(Map.of(
"paramsKey", "params"))
.build())
.directory("directory")
.dockerBuildArgs(Map.of(
"dockerBuildArgsKey", "dockerBuildArgs"))
.dockerBuildSecrets(Map.of(
"dockerBuildSecretsKey", "dockerBuildSecrets"))
.dockerBuildSsh("dockerBuildSsh")
.dockerBuildTarget("dockerBuildTarget")
.dockerFile("dockerFile")
.dockerOutputs(List.of("dockerOutputs"))
.executable(List.of("executable"))
.networkMode("networkMode")
.platform("platform")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDockerImageSourcestatic final classAn implementation forDockerImageSource -
Method Summary
Modifier and TypeMethodDescriptionstatic DockerImageSource.Builderbuilder()default BooleanDisable the cache and pass--no-cacheto thedocker buildcommand.default List<DockerCacheOption> Cache from options to pass to thedocker buildcommand.default DockerCacheOptionCache to options to pass to thedocker buildcommand.default StringThe directory containing the Docker image build instructions.Additional build arguments.Additional build secrets.default StringSSH agent socket or keys.default StringTarget build stage in a Dockerfile with multiple build stages.default StringThe name of the file with build instructions.Outputs.A command-line executable that returns the name of a local Docker image on stdout after being run.default StringNetworking mode for the RUN commands during build.default StringPlatform to build for.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCacheDisabled
Disable the cache and pass--no-cacheto thedocker buildcommand.Default: - cache is used
-
getCacheFrom
Cache from options to pass to thedocker buildcommand.Default: - no cache from options are passed to the build command
- See Also:
-
getCacheTo
Cache to options to pass to thedocker buildcommand.Default: - no cache to options are passed to the build command
- See Also:
-
getDirectory
The directory containing the Docker image build instructions.This path is relative to the asset manifest location.
Default: - Exactly one of `directory` and `executable` is required
-
getDockerBuildArgs
Additional build arguments.Only allowed when
directoryis set.Default: - No additional build arguments
-
getDockerBuildSecrets
Additional build secrets.Only allowed when
directoryis set.Default: - No additional build secrets
-
getDockerBuildSsh
SSH agent socket or keys.Requires building with docker buildkit.
Default: - No ssh flag is set
-
getDockerBuildTarget
Target build stage in a Dockerfile with multiple build stages.Only allowed when
directoryis set.Default: - The last stage in the Dockerfile
-
getDockerFile
The name of the file with build instructions.Only allowed when
directoryis set.Default: "Dockerfile"
-
getDockerOutputs
Outputs.Default: - no outputs are passed to the build command (default outputs are used)
- See Also:
-
getExecutable
A command-line executable that returns the name of a local Docker image on stdout after being run.Default: - Exactly one of `directory` and `executable` is required
-
getNetworkMode
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
-
getPlatform
Platform to build for. Requires Docker Buildx.Specify this property to build images on a specific platform/architecture.
Default: - current machine platform
-
builder
- Returns:
- a
DockerImageSource.BuilderofDockerImageSource
-