Skip to content

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.

BuildArgsOptional

BuildArgs *map[string]*string
  • Type: map[string]string
  • Default: no build args

Build args.


CacheDisabledOptional

CacheDisabled *bool
  • Type: *bool
  • Default: cache is used

Disable the cache and pass --no-cache to the docker build command.


CacheFromOptional

CacheFrom *[]DockerCacheOption

Cache from options to pass to the docker build command.


CacheToOptional

CacheTo DockerCacheOption

Cache to options to pass to the docker build command.


FileOptional

File *string
  • Type: *string
  • Default: Dockerfile

Name of the Dockerfile, must relative to the docker build path.


PlatformOptional

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


TargetStageOptional

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