Skip to content

DockerBuildOptions

Docker build options.

Initializer

import { DockerBuildOptions } from '@alicloud/ros-cdk-core'
const dockerBuildOptions: DockerBuildOptions = { ... }

Properties

Name Type Description
buildArgs {[ key: string ]: string} Build args.
cacheDisabled boolean 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

public readonly buildArgs: {[ key: string ]: string};
  • Type: {[ key: string ]: string}
  • Default: no build args

Build args.


cacheDisabledOptional

public readonly cacheDisabled: boolean;
  • Type: boolean
  • Default: cache is used

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


cacheFromOptional

public readonly cacheFrom: DockerCacheOption[];

Cache from options to pass to the docker build command.


cacheToOptional

public readonly cacheTo: DockerCacheOption;

Cache to options to pass to the docker build command.


fileOptional

public readonly file: string;
  • Type: string
  • Default: Dockerfile

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


platformOptional

public readonly 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

public readonly 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