docker logo
Docker v4.2.3, May 24 23

docker.RemoteImage

Explore with Pulumi AI

Pulls a Docker image to a given Docker host from a Docker Registry. This resource will not pull new layers of the image automatically unless used in conjunction with docker.RegistryImage data source to update the pull_triggers field.

Example Usage

Basic

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Docker = Pulumi.Docker;

return await Deployment.RunAsync(() => 
{
    var ubuntu = new Docker.RemoteImage("ubuntu", new()
    {
        Name = "ubuntu:precise",
    });

});
package main

import (
	"github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := docker.NewRemoteImage(ctx, "ubuntu", &docker.RemoteImageArgs{
			Name: pulumi.String("ubuntu:precise"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.RemoteImage;
import com.pulumi.docker.RemoteImageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var ubuntu = new RemoteImage("ubuntu", RemoteImageArgs.builder()        
            .name("ubuntu:precise")
            .build());

    }
}
import pulumi
import pulumi_docker as docker

ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";

const ubuntu = new docker.RemoteImage("ubuntu", {name: "ubuntu:precise"});
resources:
  ubuntu:
    type: docker:RemoteImage
    properties:
      name: ubuntu:precise

Dynamic updates

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Docker = Pulumi.Docker;

return await Deployment.RunAsync(() => 
{
    var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new()
    {
        Name = "ubuntu:precise",
    });

    var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new()
    {
        Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name),
        PullTriggers = new[]
        {
            ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest),
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, &docker.LookupRegistryImageArgs{
			Name: "ubuntu:precise",
		}, nil)
		if err != nil {
			return err
		}
		_, err = docker.NewRemoteImage(ctx, "ubuntuRemoteImage", &docker.RemoteImageArgs{
			Name: *pulumi.String(ubuntuRegistryImage.Name),
			PullTriggers: pulumi.StringArray{
				*pulumi.String(ubuntuRegistryImage.Sha256Digest),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.DockerFunctions;
import com.pulumi.docker.inputs.GetRegistryImageArgs;
import com.pulumi.docker.RemoteImage;
import com.pulumi.docker.RemoteImageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder()
            .name("ubuntu:precise")
            .build());

        var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder()        
            .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.name()))
            .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest()))
            .build());

    }
}
import pulumi
import pulumi_docker as docker

ubuntu_registry_image = docker.get_registry_image(name="ubuntu:precise")
ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage",
    name=ubuntu_registry_image.name,
    pull_triggers=[ubuntu_registry_image.sha256_digest])
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";

const ubuntuRegistryImage = docker.getRegistryImage({
    name: "ubuntu:precise",
});
const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", {
    name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name),
    pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)],
});
resources:
  ubuntuRemoteImage:
    type: docker:RemoteImage
    properties:
      name: ${ubuntuRegistryImage.name}
      pullTriggers:
        - ${ubuntuRegistryImage.sha256Digest}
variables:
  ubuntuRegistryImage:
    fn::invoke:
      Function: docker:getRegistryImage
      Arguments:
        name: ubuntu:precise

Create RemoteImage Resource

new RemoteImage(name: string, args: RemoteImageArgs, opts?: CustomResourceOptions);
@overload
def RemoteImage(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                build: Optional[RemoteImageBuildArgs] = None,
                force_remove: Optional[bool] = None,
                keep_locally: Optional[bool] = None,
                name: Optional[str] = None,
                platform: Optional[str] = None,
                pull_triggers: Optional[Sequence[str]] = None,
                triggers: Optional[Mapping[str, Any]] = None)
@overload
def RemoteImage(resource_name: str,
                args: RemoteImageArgs,
                opts: Optional[ResourceOptions] = None)
func NewRemoteImage(ctx *Context, name string, args RemoteImageArgs, opts ...ResourceOption) (*RemoteImage, error)
public RemoteImage(string name, RemoteImageArgs args, CustomResourceOptions? opts = null)
public RemoteImage(String name, RemoteImageArgs args)
public RemoteImage(String name, RemoteImageArgs args, CustomResourceOptions options)
type: docker:RemoteImage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args RemoteImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args RemoteImageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RemoteImageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RemoteImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args RemoteImageArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

RemoteImage Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The RemoteImage resource accepts the following input properties:

Name string

The name of the Docker image, including any tags or SHA256 repo digests.

Build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

ForceRemove bool

If true, then the image is removed forcibly when the resource is destroyed.

KeepLocally bool

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

Platform string

The platform to use when pulling the image. Defaults to the platform of the current machine.

PullTriggers List<string>

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

Triggers Dictionary<string, object>

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

Name string

The name of the Docker image, including any tags or SHA256 repo digests.

Build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

ForceRemove bool

If true, then the image is removed forcibly when the resource is destroyed.

KeepLocally bool

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

Platform string

The platform to use when pulling the image. Defaults to the platform of the current machine.

PullTriggers []string

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

Triggers map[string]interface{}

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

name String

The name of the Docker image, including any tags or SHA256 repo digests.

build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

forceRemove Boolean

If true, then the image is removed forcibly when the resource is destroyed.

keepLocally Boolean

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

platform String

The platform to use when pulling the image. Defaults to the platform of the current machine.

pullTriggers List<String>

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

triggers Map<String,Object>

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

name string

The name of the Docker image, including any tags or SHA256 repo digests.

build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

forceRemove boolean

If true, then the image is removed forcibly when the resource is destroyed.

keepLocally boolean

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

platform string

The platform to use when pulling the image. Defaults to the platform of the current machine.

pullTriggers string[]

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

triggers {[key: string]: any}

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

name str

The name of the Docker image, including any tags or SHA256 repo digests.

build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

force_remove bool

If true, then the image is removed forcibly when the resource is destroyed.

keep_locally bool

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

platform str

The platform to use when pulling the image. Defaults to the platform of the current machine.

pull_triggers Sequence[str]

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

triggers Mapping[str, Any]

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

name String

The name of the Docker image, including any tags or SHA256 repo digests.

build Property Map

Configuration to build an image. Please see docker build command reference too.

forceRemove Boolean

If true, then the image is removed forcibly when the resource is destroyed.

keepLocally Boolean

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

platform String

The platform to use when pulling the image. Defaults to the platform of the current machine.

pullTriggers List<String>

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

triggers Map<Any>

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

Outputs

All input properties are implicitly available as output properties. Additionally, the RemoteImage resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

ImageId string

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

RepoDigest string

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

Id string

The provider-assigned unique ID for this managed resource.

ImageId string

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

RepoDigest string

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

id String

The provider-assigned unique ID for this managed resource.

imageId String

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

repoDigest String

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

id string

The provider-assigned unique ID for this managed resource.

imageId string

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

repoDigest string

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

id str

The provider-assigned unique ID for this managed resource.

image_id str

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

repo_digest str

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

id String

The provider-assigned unique ID for this managed resource.

imageId String

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

repoDigest String

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

Look up Existing RemoteImage Resource

Get an existing RemoteImage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RemoteImageState, opts?: CustomResourceOptions): RemoteImage
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        build: Optional[RemoteImageBuildArgs] = None,
        force_remove: Optional[bool] = None,
        image_id: Optional[str] = None,
        keep_locally: Optional[bool] = None,
        name: Optional[str] = None,
        platform: Optional[str] = None,
        pull_triggers: Optional[Sequence[str]] = None,
        repo_digest: Optional[str] = None,
        triggers: Optional[Mapping[str, Any]] = None) -> RemoteImage
func GetRemoteImage(ctx *Context, name string, id IDInput, state *RemoteImageState, opts ...ResourceOption) (*RemoteImage, error)
public static RemoteImage Get(string name, Input<string> id, RemoteImageState? state, CustomResourceOptions? opts = null)
public static RemoteImage get(String name, Output<String> id, RemoteImageState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

ForceRemove bool

If true, then the image is removed forcibly when the resource is destroyed.

ImageId string

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

KeepLocally bool

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

Name string

The name of the Docker image, including any tags or SHA256 repo digests.

Platform string

The platform to use when pulling the image. Defaults to the platform of the current machine.

PullTriggers List<string>

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

RepoDigest string

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

Triggers Dictionary<string, object>

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

Build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

ForceRemove bool

If true, then the image is removed forcibly when the resource is destroyed.

ImageId string

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

KeepLocally bool

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

Name string

The name of the Docker image, including any tags or SHA256 repo digests.

Platform string

The platform to use when pulling the image. Defaults to the platform of the current machine.

PullTriggers []string

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

RepoDigest string

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

Triggers map[string]interface{}

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

forceRemove Boolean

If true, then the image is removed forcibly when the resource is destroyed.

imageId String

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

keepLocally Boolean

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

name String

The name of the Docker image, including any tags or SHA256 repo digests.

platform String

The platform to use when pulling the image. Defaults to the platform of the current machine.

pullTriggers List<String>

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

repoDigest String

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

triggers Map<String,Object>

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

forceRemove boolean

If true, then the image is removed forcibly when the resource is destroyed.

imageId string

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

keepLocally boolean

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

name string

The name of the Docker image, including any tags or SHA256 repo digests.

platform string

The platform to use when pulling the image. Defaults to the platform of the current machine.

pullTriggers string[]

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

repoDigest string

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

triggers {[key: string]: any}

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

build RemoteImageBuildArgs

Configuration to build an image. Please see docker build command reference too.

force_remove bool

If true, then the image is removed forcibly when the resource is destroyed.

image_id str

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

keep_locally bool

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

name str

The name of the Docker image, including any tags or SHA256 repo digests.

platform str

The platform to use when pulling the image. Defaults to the platform of the current machine.

pull_triggers Sequence[str]

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

repo_digest str

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

triggers Mapping[str, Any]

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

build Property Map

Configuration to build an image. Please see docker build command reference too.

forceRemove Boolean

If true, then the image is removed forcibly when the resource is destroyed.

imageId String

The ID of the image (as seen when executing docker inspect on the image). Can be used to reference the image via its ID in other resources.

keepLocally Boolean

If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

name String

The name of the Docker image, including any tags or SHA256 repo digests.

platform String

The platform to use when pulling the image. Defaults to the platform of the current machine.

pullTriggers List<String>

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the dockerregistryimage.

repoDigest String

The image sha256 digest in the form of repo[:tag]@sha256:<hash>.

triggers Map<Any>

A map of arbitrary strings that, when changed, will force the docker.RemoteImage resource to be replaced. This can be used to rebuild an image when contents of source code folders change

Supporting Types

RemoteImageBuild

Context string

Value to specify the build context. Currently, only a PATH context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.

AuthConfigs List<RemoteImageBuildAuthConfig>

The configuration for the authentication

BuildArg Dictionary<string, string>

Set build-time variables

BuildArgs Dictionary<string, string>

Pairs for build-time variables in the form TODO

BuildId string

BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.

CacheFroms List<string>

Images to consider as cache sources

CgroupParent string

Optional parent cgroup for the container

CpuPeriod int

The length of a CPU period in microseconds

CpuQuota int

Microseconds of CPU time that the container can get in a CPU period

CpuSetCpus string

CPUs in which to allow execution (e.g., 0-3, 0, 1)

CpuSetMems string

MEMs in which to allow execution (0-3, 0, 1)

CpuShares int

CPU shares (relative weight)

Dockerfile string

Name of the Dockerfile. Defaults to Dockerfile.

ExtraHosts List<string>

A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]

ForceRemove bool

Always remove intermediate containers

Isolation string

Isolation represents the isolation technology of a container. The supported values are

Label Dictionary<string, string>

Set metadata for an image

Labels Dictionary<string, string>

User-defined key/value metadata

Memory int

Set memory limit for build

MemorySwap int

Total memory (memory + swap), -1 to enable unlimited swap

NetworkMode string

Set the networking mode for the RUN instructions during build

NoCache bool

Do not use the cache when building the image

Platform string

Set platform if server is multi-platform capable

PullParent bool

Attempt to pull the image even if an older image exists locally

RemoteContext string

A Git repository URI or HTTP/HTTPS context URI

Remove bool

Remove intermediate containers after a successful build. Defaults to true.

SecurityOpts List<string>

The security options

SessionId string

Set an ID for the build session

ShmSize int

Size of /dev/shm in bytes. The size must be greater than 0

Squash bool

If true the new layers are squashed into a new image with a single new layer

SuppressOutput bool

Suppress the build output and print image ID on success

Tags List<string>

Name and optionally a tag in the 'name:tag' format

Target string

Set the target build stage to build

Ulimits List<RemoteImageBuildUlimit>

Configuration for ulimits

Version string

Version of the underlying builder to use

Context string

Value to specify the build context. Currently, only a PATH context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.

AuthConfigs []RemoteImageBuildAuthConfig

The configuration for the authentication

BuildArg map[string]string

Set build-time variables

BuildArgs map[string]string

Pairs for build-time variables in the form TODO

BuildId string

BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.

CacheFroms []string

Images to consider as cache sources

CgroupParent string

Optional parent cgroup for the container

CpuPeriod int

The length of a CPU period in microseconds

CpuQuota int

Microseconds of CPU time that the container can get in a CPU period

CpuSetCpus string

CPUs in which to allow execution (e.g., 0-3, 0, 1)

CpuSetMems string

MEMs in which to allow execution (0-3, 0, 1)

CpuShares int

CPU shares (relative weight)

Dockerfile string

Name of the Dockerfile. Defaults to Dockerfile.

ExtraHosts []string

A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]

ForceRemove bool

Always remove intermediate containers

Isolation string

Isolation represents the isolation technology of a container. The supported values are

Label map[string]string

Set metadata for an image

Labels map[string]string

User-defined key/value metadata

Memory int

Set memory limit for build

MemorySwap int

Total memory (memory + swap), -1 to enable unlimited swap

NetworkMode string

Set the networking mode for the RUN instructions during build

NoCache bool

Do not use the cache when building the image

Platform string

Set platform if server is multi-platform capable

PullParent bool

Attempt to pull the image even if an older image exists locally

RemoteContext string

A Git repository URI or HTTP/HTTPS context URI

Remove bool

Remove intermediate containers after a successful build. Defaults to true.

SecurityOpts []string

The security options

SessionId string

Set an ID for the build session

ShmSize int

Size of /dev/shm in bytes. The size must be greater than 0

Squash bool

If true the new layers are squashed into a new image with a single new layer

SuppressOutput bool

Suppress the build output and print image ID on success

Tags []string

Name and optionally a tag in the 'name:tag' format

Target string

Set the target build stage to build

Ulimits []RemoteImageBuildUlimit

Configuration for ulimits

Version string

Version of the underlying builder to use

context String

Value to specify the build context. Currently, only a PATH context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.

authConfigs List<RemoteImageBuildAuthConfig>

The configuration for the authentication

buildArg Map<String,String>

Set build-time variables

buildArgs Map<String,String>

Pairs for build-time variables in the form TODO

buildId String

BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.

cacheFroms List<String>

Images to consider as cache sources

cgroupParent String

Optional parent cgroup for the container

cpuPeriod Integer

The length of a CPU period in microseconds

cpuQuota Integer

Microseconds of CPU time that the container can get in a CPU period

cpuSetCpus String

CPUs in which to allow execution (e.g., 0-3, 0, 1)

cpuSetMems String

MEMs in which to allow execution (0-3, 0, 1)

cpuShares Integer

CPU shares (relative weight)

dockerfile String

Name of the Dockerfile. Defaults to Dockerfile.

extraHosts List<String>

A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]

forceRemove Boolean

Always remove intermediate containers

isolation String

Isolation represents the isolation technology of a container. The supported values are

label Map<String,String>

Set metadata for an image

labels Map<String,String>

User-defined key/value metadata

memory Integer

Set memory limit for build

memorySwap Integer

Total memory (memory + swap), -1 to enable unlimited swap

networkMode String

Set the networking mode for the RUN instructions during build

noCache Boolean

Do not use the cache when building the image

platform String

Set platform if server is multi-platform capable

pullParent Boolean

Attempt to pull the image even if an older image exists locally

remoteContext String

A Git repository URI or HTTP/HTTPS context URI

remove Boolean

Remove intermediate containers after a successful build. Defaults to true.

securityOpts List<String>

The security options

sessionId String

Set an ID for the build session

shmSize Integer

Size of /dev/shm in bytes. The size must be greater than 0

squash Boolean

If true the new layers are squashed into a new image with a single new layer

suppressOutput Boolean

Suppress the build output and print image ID on success

tags List<String>

Name and optionally a tag in the 'name:tag' format

target String

Set the target build stage to build

ulimits List<RemoteImageBuildUlimit>

Configuration for ulimits

version String

Version of the underlying builder to use

context string

Value to specify the build context. Currently, only a PATH context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.

authConfigs RemoteImageBuildAuthConfig[]

The configuration for the authentication

buildArg {[key: string]: string}

Set build-time variables

buildArgs {[key: string]: string}

Pairs for build-time variables in the form TODO

buildId string

BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.

cacheFroms string[]

Images to consider as cache sources

cgroupParent string

Optional parent cgroup for the container

cpuPeriod number

The length of a CPU period in microseconds

cpuQuota number

Microseconds of CPU time that the container can get in a CPU period

cpuSetCpus string

CPUs in which to allow execution (e.g., 0-3, 0, 1)

cpuSetMems string

MEMs in which to allow execution (0-3, 0, 1)

cpuShares number

CPU shares (relative weight)

dockerfile string

Name of the Dockerfile. Defaults to Dockerfile.

extraHosts string[]

A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]

forceRemove boolean

Always remove intermediate containers

isolation string

Isolation represents the isolation technology of a container. The supported values are

label {[key: string]: string}

Set metadata for an image

labels {[key: string]: string}

User-defined key/value metadata

memory number

Set memory limit for build

memorySwap number

Total memory (memory + swap), -1 to enable unlimited swap

networkMode string

Set the networking mode for the RUN instructions during build

noCache boolean

Do not use the cache when building the image

platform string

Set platform if server is multi-platform capable

pullParent boolean

Attempt to pull the image even if an older image exists locally

remoteContext string

A Git repository URI or HTTP/HTTPS context URI

remove boolean

Remove intermediate containers after a successful build. Defaults to true.

securityOpts string[]

The security options

sessionId string

Set an ID for the build session

shmSize number

Size of /dev/shm in bytes. The size must be greater than 0

squash boolean

If true the new layers are squashed into a new image with a single new layer

suppressOutput boolean

Suppress the build output and print image ID on success

tags string[]

Name and optionally a tag in the 'name:tag' format

target string

Set the target build stage to build

ulimits RemoteImageBuildUlimit[]

Configuration for ulimits

version string

Version of the underlying builder to use

context str

Value to specify the build context. Currently, only a PATH context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.

auth_configs Sequence[RemoteImageBuildAuthConfig]

The configuration for the authentication

build_arg Mapping[str, str]

Set build-time variables

build_args Mapping[str, str]

Pairs for build-time variables in the form TODO

build_id str

BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.

cache_froms Sequence[str]

Images to consider as cache sources

cgroup_parent str

Optional parent cgroup for the container

cpu_period int

The length of a CPU period in microseconds

cpu_quota int

Microseconds of CPU time that the container can get in a CPU period

cpu_set_cpus str

CPUs in which to allow execution (e.g., 0-3, 0, 1)

cpu_set_mems str

MEMs in which to allow execution (0-3, 0, 1)

cpu_shares int

CPU shares (relative weight)

dockerfile str

Name of the Dockerfile. Defaults to Dockerfile.

extra_hosts Sequence[str]

A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]

force_remove bool

Always remove intermediate containers

isolation str

Isolation represents the isolation technology of a container. The supported values are

label Mapping[str, str]

Set metadata for an image

labels Mapping[str, str]

User-defined key/value metadata

memory int

Set memory limit for build

memory_swap int

Total memory (memory + swap), -1 to enable unlimited swap

network_mode str

Set the networking mode for the RUN instructions during build

no_cache bool

Do not use the cache when building the image

platform str

Set platform if server is multi-platform capable

pull_parent bool

Attempt to pull the image even if an older image exists locally

remote_context str

A Git repository URI or HTTP/HTTPS context URI

remove bool

Remove intermediate containers after a successful build. Defaults to true.

security_opts Sequence[str]

The security options

session_id str

Set an ID for the build session

shm_size int

Size of /dev/shm in bytes. The size must be greater than 0

squash bool

If true the new layers are squashed into a new image with a single new layer

suppress_output bool

Suppress the build output and print image ID on success

tags Sequence[str]

Name and optionally a tag in the 'name:tag' format

target str

Set the target build stage to build

ulimits Sequence[RemoteImageBuildUlimit]

Configuration for ulimits

version str

Version of the underlying builder to use

context String

Value to specify the build context. Currently, only a PATH context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.

authConfigs List<Property Map>

The configuration for the authentication

buildArg Map<String>

Set build-time variables

buildArgs Map<String>

Pairs for build-time variables in the form TODO

buildId String

BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.

cacheFroms List<String>

Images to consider as cache sources

cgroupParent String

Optional parent cgroup for the container

cpuPeriod Number

The length of a CPU period in microseconds

cpuQuota Number

Microseconds of CPU time that the container can get in a CPU period

cpuSetCpus String

CPUs in which to allow execution (e.g., 0-3, 0, 1)

cpuSetMems String

MEMs in which to allow execution (0-3, 0, 1)

cpuShares Number

CPU shares (relative weight)

dockerfile String

Name of the Dockerfile. Defaults to Dockerfile.

extraHosts List<String>

A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]

forceRemove Boolean

Always remove intermediate containers

isolation String

Isolation represents the isolation technology of a container. The supported values are

label Map<String>

Set metadata for an image

labels Map<String>

User-defined key/value metadata

memory Number

Set memory limit for build

memorySwap Number

Total memory (memory + swap), -1 to enable unlimited swap

networkMode String

Set the networking mode for the RUN instructions during build

noCache Boolean

Do not use the cache when building the image

platform String

Set platform if server is multi-platform capable

pullParent Boolean

Attempt to pull the image even if an older image exists locally

remoteContext String

A Git repository URI or HTTP/HTTPS context URI

remove Boolean

Remove intermediate containers after a successful build. Defaults to true.

securityOpts List<String>

The security options

sessionId String

Set an ID for the build session

shmSize Number

Size of /dev/shm in bytes. The size must be greater than 0

squash Boolean

If true the new layers are squashed into a new image with a single new layer

suppressOutput Boolean

Suppress the build output and print image ID on success

tags List<String>

Name and optionally a tag in the 'name:tag' format

target String

Set the target build stage to build

ulimits List<Property Map>

Configuration for ulimits

version String

Version of the underlying builder to use

RemoteImageBuildAuthConfig

HostName string
Auth string
Email string
IdentityToken string
Password string
RegistryToken string
ServerAddress string
UserName string
HostName string
Auth string
Email string
IdentityToken string
Password string
RegistryToken string
ServerAddress string
UserName string
hostName String
auth String
email String
identityToken String
password String
registryToken String
serverAddress String
userName String
hostName string
auth string
email string
identityToken string
password string
registryToken string
serverAddress string
userName string
hostName String
auth String
email String
identityToken String
password String
registryToken String
serverAddress String
userName String

RemoteImageBuildUlimit

Hard int
Name string

The name of the Docker image, including any tags or SHA256 repo digests.

Soft int
Hard int
Name string

The name of the Docker image, including any tags or SHA256 repo digests.

Soft int
hard Integer
name String

The name of the Docker image, including any tags or SHA256 repo digests.

soft Integer
hard number
name string

The name of the Docker image, including any tags or SHA256 repo digests.

soft number
hard int
name str

The name of the Docker image, including any tags or SHA256 repo digests.

soft int
hard Number
name String

The name of the Docker image, including any tags or SHA256 repo digests.

soft Number

Package Details

Repository
Docker pulumi/pulumi-docker
License
Apache-2.0
Notes

This Pulumi package is based on the docker Terraform Provider.