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. |
buildArgs
Optional
public readonly buildArgs: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: no build args
Build args.
cacheDisabled
Optional
public readonly cacheDisabled: boolean;
- Type: boolean
- Default: cache is used
Disable the cache and pass --no-cache
to the docker build
command.
cacheFrom
Optional
public readonly cacheFrom: DockerCacheOption[];
- Type: DockerCacheOption[]
- Default: no cache from args are passed
Cache from options to pass to the docker build
command.
cacheTo
Optional
public readonly cacheTo: DockerCacheOption;
- Type: DockerCacheOption
- Default: no cache to args are passed
Cache to options to pass to the docker build
command.
file
Optional
public readonly file: string;
- Type: string
- Default:
Dockerfile
Name of the Dockerfile, must relative to the docker build path.
platform
Optional
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
targetStage
Optional
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