DockerImageAssetSource
Initializer
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
&alicloudroscdkcore.DockerImageAssetSource {
SourceHash: *string,
AssetName: *string,
DirectoryName: *string,
DockerBuildArgs: *map[string]*string,
DockerBuildSACRets: *map[string]*string,
DockerBuildSsh: *string,
DockerBuildTarget: *string,
DockerCacheDisabled: *bool,
DockerCacheFrom: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.DockerCacheOption,
DockerCacheTo: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.DockerCacheOption,
DockerFile: *string,
DockerOutputs: *[]*string,
Executable: *[]*string,
NetworkMode: *string,
Platform: *string,
}
Properties
Name | Type | Description |
---|---|---|
SourceHash |
*string |
The hash of the contents of the docker build context. |
AssetName |
*string |
Unique identifier of the docker image asset and its potential revisions. |
DirectoryName |
*string |
The directory where the Dockerfile is stored, must be relative to the cloud assembly root. |
DockerBuildArgs |
map[string]string |
Build args to pass to the docker build command. |
DockerBuildSACRets |
map[string]string |
Build sACRets to pass to the docker build command. |
DockerBuildSsh |
*string |
SSH agent socket or keys to pass to the docker buildx command. |
DockerBuildTarget |
*string |
Docker target to build to. |
DockerCacheDisabled |
*bool |
Disable the cache and pass --no-cache to the docker build command. |
DockerCacheFrom |
*[]DockerCacheOption |
Cache from options to pass to the docker build command. |
DockerCacheTo |
DockerCacheOption |
Cache to options to pass to the docker build command. |
DockerFile |
*string |
Path to the Dockerfile (relative to the directory). |
DockerOutputs |
[]string |
Outputs to pass to the docker build command. |
Executable |
[]string |
An external command that will produce the packaged asset. |
NetworkMode |
*string |
Networking mode for the RUN commands during build. Requires Docker Engine API v1.25+. |
Platform |
*string |
Platform to build for. Requires Docker Buildx. |
SourceHash
Required
SourceHash *string
- Type: *string
The hash of the contents of the docker build context.
This hash is used throughout the system to identify this image and avoid duplicate work in case the source did not change.
NOTE: this means that if you wish to update your docker image, you must make a modification to the source (e.g. add some metadata to your Dockerfile).
AssetName
Optional
AssetName *string
- Type: *string
- Default: no asset name
Unique identifier of the docker image asset and its potential revisions.
Required if using AppScopedStagingSynthesizer.
DirectoryName
Optional
DirectoryName *string
- Type: *string
- Default: Exactly one of
directoryName
andexecutable
is required
The directory where the Dockerfile is stored, must be relative to the cloud assembly root.
DockerBuildArgs
Optional
DockerBuildArgs *map[string]*string
- Type: map[string]string
- Default: no build args are passed
Build args to pass to the docker build
command.
Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens.
Only allowed when directoryName
is specified.
DockerBuildSACRets
Optional
DockerBuildSACRets *map[string]*string
- Type: map[string]string
- Default: no build sACRets are passed
Build sACRets to pass to the docker build
command.
Since Docker build sACRets are resolved before deployment, keys and values cannot refer to unresolved tokens.
Only allowed when directoryName
is specified.
DockerBuildSsh
Optional
DockerBuildSsh *string
- Type: *string
- Default: no ssh arg is passed
SSH agent socket or keys to pass to the docker buildx
command.
DockerBuildTarget
Optional
DockerBuildTarget *string
- Type: *string
- Default: no target
Docker target to build to.
Only allowed when directoryName
is specified.
DockerCacheDisabled
Optional
DockerCacheDisabled *bool
- Type: *bool
- Default: cache is used
Disable the cache and pass --no-cache
to the docker build
command.
DockerCacheFrom
Optional
DockerCacheFrom *[]DockerCacheOption
- Type: *[]DockerCacheOption
- Default: no cache from args are passed
Cache from options to pass to the docker build
command.
DockerCacheTo
Optional
DockerCacheTo DockerCacheOption
- Type: DockerCacheOption
- Default: no cache to args are passed
Cache to options to pass to the docker build
command.
DockerFile
Optional
DockerFile *string
- Type: *string
- Default: no file
Path to the Dockerfile (relative to the directory).
Only allowed when directoryName
is specified.
DockerOutputs
Optional
DockerOutputs *[]*string
- Type: []string
- Default: no build args are passed
Outputs to pass to the docker build
command.
Executable
Optional
Executable *[]*string
- Type: []string
- Default: Exactly one of
directoryName
andexecutable
is required
An external command that will produce the packaged asset.
The command should produce the name of a local Docker image on stdout
.
NetworkMode
Optional
NetworkMode *string
- Type: *string
- Default: no networking mode specified
Networking mode for the RUN commands during build. Requires Docker Engine API v1.25+.
Specify this property to build images on a specific networking mode.
Platform
Optional
Platform *string
- Type: *string
- Default: no platform specified (the current machine architecture will be used)
Platform to build for. Requires Docker Buildx.
Specify this property to build images on a specific platform.