DockerBuildOptions
Docker build options.
Initializer
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
&alicloudroscdkcore.DockerBuildOptions {
BuildArgs: *map[string]*string,
CacheDisabled: *bool,
CacheFrom: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.DockerCacheOption,
CacheTo: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.DockerCacheOption,
File: *string,
Platform: *string,
TargetStage: *string,
}
Properties
Name | Type | Description |
---|---|---|
BuildArgs |
map[string]string |
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
BuildArgs *map[string]*string
- Type: map[string]string
- Default: no build args
Build args.
CacheDisabled
Optional
CacheDisabled *bool
- Type: *bool
- Default: cache is used
Disable the cache and pass --no-cache
to the docker build
command.
CacheFrom
Optional
CacheFrom *[]DockerCacheOption
- Type: *[]DockerCacheOption
- Default: no cache from args are passed
Cache from options to pass to the docker build
command.
CacheTo
Optional
CacheTo DockerCacheOption
- Type: DockerCacheOption
- Default: no cache to args are passed
Cache to options to pass to the docker build
command.
File
Optional
File *string
- Type: *string
- Default:
Dockerfile
Name of the Dockerfile, must relative to the docker build path.
Platform
Optional
Platform *string
- 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
TargetStage *string
- 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