DockerImageSource
Properties for how to produce a Docker image from a source.
Initializer
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema"
&alicloudroscdkassemblyschema.DockerImageSource {
CacheDisabled: *bool,
CacheFrom: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.DockerCacheOption,
CacheTo: github.com/alibabacloud-go/ros-cdk/alicloudroscdkassemblyschema.DockerCacheOption,
Directory: *string,
DockerBuildArgs: *map[string]*string,
DockerBuildSecrets: *map[string]*string,
DockerBuildSsh: *string,
DockerBuildTarget: *string,
DockerFile: *string,
DockerOutputs: *[]*string,
Executable: *[]*string,
NetworkMode: *string,
Platform: *string,
}
Properties
Name | Type | Description |
---|---|---|
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. |
Directory |
*string |
The directory containing the Docker image build instructions. |
DockerBuildArgs |
map[string]string |
Additional build arguments. |
DockerBuildSecrets |
map[string]string |
Additional build secrets. |
DockerBuildSsh |
*string |
SSH agent socket or keys. |
DockerBuildTarget |
*string |
Target build stage in a Dockerfile with multiple build stages. |
DockerFile |
*string |
The name of the file with build instructions. |
DockerOutputs |
[]string |
Outputs. |
Executable |
[]string |
A command-line executable that returns the name of a local Docker image on stdout after being run. |
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. |
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 options are passed to the build command
Cache from options to pass to the docker build
command.
CacheTo
Optional
CacheTo DockerCacheOption
- Type: DockerCacheOption
- Default: no cache to options are passed to the build command
Cache to options to pass to the docker build
command.
Directory
Optional
Directory *string
- Type: *string
- Default: Exactly one of
directory
andexecutable
is required
The directory containing the Docker image build instructions.
This path is relative to the asset manifest location.
DockerBuildArgs
Optional
DockerBuildArgs *map[string]*string
- Type: map[string]string
- Default: No additional build arguments
Additional build arguments.
Only allowed when directory
is set.
DockerBuildSecrets
Optional
DockerBuildSecrets *map[string]*string
- Type: map[string]string
- Default: No additional build secrets
Additional build secrets.
Only allowed when directory
is set.
DockerBuildSsh
Optional
DockerBuildSsh *string
- Type: *string
- Default: No ssh flag is set
SSH agent socket or keys.
Requires building with docker buildkit.
DockerBuildTarget
Optional
DockerBuildTarget *string
- Type: *string
- Default: The last stage in the Dockerfile
Target build stage in a Dockerfile with multiple build stages.
Only allowed when directory
is set.
DockerFile
Optional
DockerFile *string
- Type: *string
- Default: "Dockerfile"
The name of the file with build instructions.
Only allowed when directory
is set.
DockerOutputs
Optional
DockerOutputs *[]*string
- Type: []string
- Default: no outputs are passed to the build command (default outputs are used)
Outputs.
https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs
Executable
Optional
Executable *[]*string
- Type: []string
- Default: Exactly one of
directory
andexecutable
is required
A command-line executable that returns the name of a local Docker image on stdout after being run.
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: current machine platform
Platform to build for. Requires Docker Buildx.
Specify this property to build images on a specific platform/architecture.