DockerBuildOptions
Docker build options.
Initializer
using AlibabaCloud.SDK.ROS.CDK.Core;
new DockerBuildOptions {
System.Collections.Generic.IDictionary<string, string> BuildArgs = null,
bool CacheDisabled = null,
DockerCacheOption[] CacheFrom = null,
DockerCacheOption CacheTo = null,
string File = null,
string Platform = null,
string TargetStage = null
};
Properties
Name | Type | Description |
---|---|---|
BuildArgs |
System.Collections.Generic.IDictionary |
Build args. |
CacheDisabled |
bool |
Disable the cache and pass --no-cache to the docker build command. |
CacheFrom |
DockerCacheOption[] |
Cache from options to pass to the docker build command. |
CacheTo |
DockerCacheOption |
Cache to options to pass to the docker build command. |
File |
string |
Name of the Dockerfile, must relative to the docker build path. |
Platform |
string |
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. |
TargetStage |
string |
Set build target for multi-stage container builds. Any stage defined afterwards will be ignored. |
BuildArgs
Optional
public System.Collections.Generic.IDictionary<string, string> BuildArgs { get; set; }
- Type: System.Collections.Generic.IDictionary
- Default: no build args
Build args.
CacheDisabled
Optional
public bool CacheDisabled { get; set; }
- Type: bool
- Default: cache is used
Disable the cache and pass --no-cache
to the docker build
command.
CacheFrom
Optional
public DockerCacheOption[] CacheFrom { get; set; }
- Type: DockerCacheOption[]
- Default: no cache from args are passed
Cache from options to pass to the docker build
command.
CacheTo
Optional
public DockerCacheOption CacheTo { get; set; }
- Type: DockerCacheOption
- Default: no cache to args are passed
Cache to options to pass to the docker build
command.
File
Optional
public string File { get; set; }
- Type: string
- Default:
Dockerfile
Name of the Dockerfile, must relative to the docker build path.
Platform
Optional
public string Platform { get; set; }
- Type: 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 string TargetStage { get; set; }
- Type: 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