Class DockerBuild
DockerBuild may be used to specify detailed instructions about how to build a container.
Inherited Members
Namespace: Pulumi.Docker
Assembly: Pulumi.Docker.dll
Syntax
public class DockerBuild : ResourceArgs
Properties
View SourceArgs
An optional map of named build-time argument variables to set during the Docker build.
This flag allows you to pass built-time variables that can be accessed like environment variables
inside the RUN instruction.
Declaration
public InputMap<string> Args { get; set; }
Property Value
| Type | Description |
|---|---|
| InputMap<System.String> |
CacheFrom
An optional CacheFrom object with information about the build stages to use for the Docker
build cache. This parameter maps to the --cache-from argument to the Docker CLI. If this
parameter is true, only the final image will be pulled and passed to --cache-from; if it is
a CacheFrom object, the stages named therein will also be pulled and passed to --cache-from.
Declaration
public InputUnion<bool, CacheFrom> CacheFrom { get; set; }
Property Value
| Type | Description |
|---|---|
| InputUnion<System.Boolean, CacheFrom> |
Context
Context is a path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.
Declaration
public Input<string> Context { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |
Dockerfile
Dockerfile may be used to override the default Dockerfile name and/or location. By default, it is assumed to be a file named Dockerfile in the root of the build context.
Declaration
public Input<string> Dockerfile { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |
Env
Environment variables to set on the invocation of docker build, for example to support
DOCKER_BUILDKIT=1 docker build.
Declaration
public InputMap<string> Env { get; set; }
Property Value
| Type | Description |
|---|---|
| InputMap<System.String> |
ExtraOptions
An optional catch-all string to provide extra CLI options to the docker build command.
For example, use to specify --network host.
Declaration
public InputList<string> ExtraOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| InputList<System.String> |
Target
The target of the dockerfile to build.
Declaration
public Input<string> Target { get; set; }
Property Value
| Type | Description |
|---|---|
| Input<System.String> |