DockerBuildOptions
Docker build options.
Initializer
import com.aliyun.ros.cdk.core.DockerBuildOptions;
DockerBuildOptions.builder()
// .buildArgs(java.util.Map<java.lang.String, java.lang.String>)
// .cacheDisabled(java.lang.Boolean)
// .cacheFrom(java.util.List<DockerCacheOption>)
// .cacheTo(DockerCacheOption)
// .file(java.lang.String)
// .platform(java.lang.String)
// .targetStage(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
buildArgs |
java.util.Map |
Build args. |
cacheDisabled |
java.lang.Boolean |
Disable the cache and pass --no-cache to the docker build command. |
cacheFrom |
java.util.List<DockerCacheOption> |
Cache from options to pass to the docker build command. |
cacheTo |
DockerCacheOption |
Cache to options to pass to the docker build command. |
file |
java.lang.String |
Name of the Dockerfile, must relative to the docker build path. |
platform |
java.lang.String |
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. |
targetStage |
java.lang.String |
Set build target for multi-stage container builds. Any stage defined afterwards will be ignored. |
buildArgs
Optional
public java.util.Map<java.lang.String, java.lang.String> getBuildArgs();
- Type: java.util.Map
- Default: no build args
Build args.
cacheDisabled
Optional
public java.lang.Boolean getCacheDisabled();
- Type: java.lang.Boolean
- Default: cache is used
Disable the cache and pass --no-cache
to the docker build
command.
cacheFrom
Optional
public java.util.List<DockerCacheOption> getCacheFrom();
- Type: java.util.List<DockerCacheOption>
- Default: no cache from args are passed
Cache from options to pass to the docker build
command.
cacheTo
Optional
public DockerCacheOption getCacheTo();
- Type: DockerCacheOption
- Default: no cache to args are passed
Cache to options to pass to the docker build
command.
file
Optional
public java.lang.String getFile();
- Type: java.lang.String
- Default:
Dockerfile
Name of the Dockerfile, must relative to the docker build path.
platform
Optional
public java.lang.String getPlatform();
- Type: java.lang.String
- Default: no platform specified
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
Example value: linux/amd64
targetStage
Optional
public java.lang.String getTargetStage();
- Type: java.lang.String
- Default: Build all stages defined in the Dockerfile
Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.
Example value: build-env