1. Packages
  2. Packages
  3. Docker Provider
  4. API Docs
  5. RegistryImage
Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
docker logo
Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages the lifecycle of docker image/tag in a registry means it can store one or more version of specific docker images and identified by their tags.

    Example Usage

    To be able to update an image itself when an updated image arrives.

    using System.Collections.Generic;
    using Pulumi;
    using Docker = Pulumi.Docker;
    
    return await Deployment.RunAsync(() => 
    {
        var helloworld = new Docker.RegistryImage("helloworld", new()
        {
            Build = new Docker.Inputs.RegistryImageBuildArgs
            {
                Context = $"{path.Cwd}/absolutePathToContextFolder",
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-docker/sdk/v3/go/docker"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := docker.NewRegistryImage(ctx, "helloworld", &docker.RegistryImageArgs{
    			Build: &RegistryImageBuildArgs{
    				Context: pulumi.String(fmt.Sprintf("%v/absolutePathToContextFolder", path.Cwd)),
    			},
    		})
    		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.RegistryImage;
    import com.pulumi.docker.RegistryImageArgs;
    import com.pulumi.docker.inputs.RegistryImageBuildArgs;
    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 helloworld = new RegistryImage("helloworld", RegistryImageArgs.builder()        
                .build(RegistryImageBuildArgs.builder()
                    .context(String.format("%s/absolutePathToContextFolder", path.cwd()))
                    .build())
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as docker from "@pulumi/docker";
    import * as process from "process";
    
    const helloworld = new docker.RegistryImage("helloworld", {
        build: {
            context: `${process.cwd()}/absolutePathToContextFolder`,
        },
    });
    
    import pulumi
    import pulumi_docker as docker
    
    helloworld = docker.RegistryImage("helloworld", build=docker.RegistryImageBuildArgs(
        context=f"{path['cwd']}/absolutePathToContextFolder",
    ))
    
    resources:
      helloworld:
        type: docker:RegistryImage
        properties:
          build:
            context: ${path.cwd}/absolutePathToContextFolder
    

    Create RegistryImage Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RegistryImage(name: string, args?: RegistryImageArgs, opts?: CustomResourceOptions);
    @overload
    def RegistryImage(resource_name: str,
                      args: Optional[RegistryImageArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegistryImage(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      build: Optional[RegistryImageBuildArgs] = None,
                      insecure_skip_verify: Optional[bool] = None,
                      keep_remotely: Optional[bool] = None,
                      name: Optional[str] = None)
    func NewRegistryImage(ctx *Context, name string, args *RegistryImageArgs, opts ...ResourceOption) (*RegistryImage, error)
    public RegistryImage(string name, RegistryImageArgs? args = null, CustomResourceOptions? opts = null)
    public RegistryImage(String name, RegistryImageArgs args)
    public RegistryImage(String name, RegistryImageArgs args, CustomResourceOptions options)
    
    type: docker:RegistryImage
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RegistryImageArgs
    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 RegistryImageArgs
    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 RegistryImageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegistryImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegistryImageArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var registryImageResource = new Docker.RegistryImage("registryImageResource", new()
    {
        Build = new Docker.Inputs.RegistryImageBuildArgs
        {
            Context = "string",
            Memory = 0,
            MemorySwap = 0,
            CacheFroms = new[]
            {
                "string",
            },
            CgroupParent = "string",
            BuildArgs = 
            {
                { "string", "string" },
            },
            CpuPeriod = 0,
            CpuQuota = 0,
            CpuSetCpus = "string",
            CpuSetMems = "string",
            CpuShares = 0,
            Dockerfile = "string",
            ExtraHosts = new[]
            {
                "string",
            },
            ForceRemove = false,
            Isolation = "string",
            BuildId = "string",
            Labels = 
            {
                { "string", "string" },
            },
            NoCache = false,
            NetworkMode = "string",
            AuthConfigs = new[]
            {
                new Docker.Inputs.RegistryImageBuildAuthConfigArgs
                {
                    HostName = "string",
                    Auth = "string",
                    Email = "string",
                    IdentityToken = "string",
                    Password = "string",
                    RegistryToken = "string",
                    ServerAddress = "string",
                    UserName = "string",
                },
            },
            Platform = "string",
            PullParent = false,
            RemoteContext = "string",
            Remove = false,
            SecurityOpts = new[]
            {
                "string",
            },
            SessionId = "string",
            ShmSize = 0,
            Squash = false,
            SuppressOutput = false,
            Target = "string",
            Ulimits = new[]
            {
                new Docker.Inputs.RegistryImageBuildUlimitArgs
                {
                    Hard = 0,
                    Name = "string",
                    Soft = 0,
                },
            },
            Version = "string",
        },
        InsecureSkipVerify = false,
        KeepRemotely = false,
        Name = "string",
    });
    
    example, err := docker.NewRegistryImage(ctx, "registryImageResource", &docker.RegistryImageArgs{
    	Build: &docker.RegistryImageBuildArgs{
    		Context:    pulumi.String("string"),
    		Memory:     pulumi.Int(0),
    		MemorySwap: pulumi.Int(0),
    		CacheFroms: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		CgroupParent: pulumi.String("string"),
    		BuildArgs: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		CpuPeriod:  pulumi.Int(0),
    		CpuQuota:   pulumi.Int(0),
    		CpuSetCpus: pulumi.String("string"),
    		CpuSetMems: pulumi.String("string"),
    		CpuShares:  pulumi.Int(0),
    		Dockerfile: pulumi.String("string"),
    		ExtraHosts: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ForceRemove: pulumi.Bool(false),
    		Isolation:   pulumi.String("string"),
    		BuildId:     pulumi.String("string"),
    		Labels: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		NoCache:     pulumi.Bool(false),
    		NetworkMode: pulumi.String("string"),
    		AuthConfigs: docker.RegistryImageBuildAuthConfigArray{
    			&docker.RegistryImageBuildAuthConfigArgs{
    				HostName:      pulumi.String("string"),
    				Auth:          pulumi.String("string"),
    				Email:         pulumi.String("string"),
    				IdentityToken: pulumi.String("string"),
    				Password:      pulumi.String("string"),
    				RegistryToken: pulumi.String("string"),
    				ServerAddress: pulumi.String("string"),
    				UserName:      pulumi.String("string"),
    			},
    		},
    		Platform:      pulumi.String("string"),
    		PullParent:    pulumi.Bool(false),
    		RemoteContext: pulumi.String("string"),
    		Remove:        pulumi.Bool(false),
    		SecurityOpts: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SessionId:      pulumi.String("string"),
    		ShmSize:        pulumi.Int(0),
    		Squash:         pulumi.Bool(false),
    		SuppressOutput: pulumi.Bool(false),
    		Target:         pulumi.String("string"),
    		Ulimits: docker.RegistryImageBuildUlimitArray{
    			&docker.RegistryImageBuildUlimitArgs{
    				Hard: pulumi.Int(0),
    				Name: pulumi.String("string"),
    				Soft: pulumi.Int(0),
    			},
    		},
    		Version: pulumi.String("string"),
    	},
    	InsecureSkipVerify: pulumi.Bool(false),
    	KeepRemotely:       pulumi.Bool(false),
    	Name:               pulumi.String("string"),
    })
    
    var registryImageResource = new RegistryImage("registryImageResource", RegistryImageArgs.builder()
        .build(RegistryImageBuildArgs.builder()
            .context("string")
            .memory(0)
            .memorySwap(0)
            .cacheFroms("string")
            .cgroupParent("string")
            .buildArgs(Map.of("string", "string"))
            .cpuPeriod(0)
            .cpuQuota(0)
            .cpuSetCpus("string")
            .cpuSetMems("string")
            .cpuShares(0)
            .dockerfile("string")
            .extraHosts("string")
            .forceRemove(false)
            .isolation("string")
            .buildId("string")
            .labels(Map.of("string", "string"))
            .noCache(false)
            .networkMode("string")
            .authConfigs(RegistryImageBuildAuthConfigArgs.builder()
                .hostName("string")
                .auth("string")
                .email("string")
                .identityToken("string")
                .password("string")
                .registryToken("string")
                .serverAddress("string")
                .userName("string")
                .build())
            .platform("string")
            .pullParent(false)
            .remoteContext("string")
            .remove(false)
            .securityOpts("string")
            .sessionId("string")
            .shmSize(0)
            .squash(false)
            .suppressOutput(false)
            .target("string")
            .ulimits(RegistryImageBuildUlimitArgs.builder()
                .hard(0)
                .name("string")
                .soft(0)
                .build())
            .version("string")
            .build())
        .insecureSkipVerify(false)
        .keepRemotely(false)
        .name("string")
        .build());
    
    registry_image_resource = docker.RegistryImage("registryImageResource",
        build={
            "context": "string",
            "memory": 0,
            "memory_swap": 0,
            "cache_froms": ["string"],
            "cgroup_parent": "string",
            "build_args": {
                "string": "string",
            },
            "cpu_period": 0,
            "cpu_quota": 0,
            "cpu_set_cpus": "string",
            "cpu_set_mems": "string",
            "cpu_shares": 0,
            "dockerfile": "string",
            "extra_hosts": ["string"],
            "force_remove": False,
            "isolation": "string",
            "build_id": "string",
            "labels": {
                "string": "string",
            },
            "no_cache": False,
            "network_mode": "string",
            "auth_configs": [{
                "host_name": "string",
                "auth": "string",
                "email": "string",
                "identity_token": "string",
                "password": "string",
                "registry_token": "string",
                "server_address": "string",
                "user_name": "string",
            }],
            "platform": "string",
            "pull_parent": False,
            "remote_context": "string",
            "remove": False,
            "security_opts": ["string"],
            "session_id": "string",
            "shm_size": 0,
            "squash": False,
            "suppress_output": False,
            "target": "string",
            "ulimits": [{
                "hard": 0,
                "name": "string",
                "soft": 0,
            }],
            "version": "string",
        },
        insecure_skip_verify=False,
        keep_remotely=False,
        name="string")
    
    const registryImageResource = new docker.RegistryImage("registryImageResource", {
        build: {
            context: "string",
            memory: 0,
            memorySwap: 0,
            cacheFroms: ["string"],
            cgroupParent: "string",
            buildArgs: {
                string: "string",
            },
            cpuPeriod: 0,
            cpuQuota: 0,
            cpuSetCpus: "string",
            cpuSetMems: "string",
            cpuShares: 0,
            dockerfile: "string",
            extraHosts: ["string"],
            forceRemove: false,
            isolation: "string",
            buildId: "string",
            labels: {
                string: "string",
            },
            noCache: false,
            networkMode: "string",
            authConfigs: [{
                hostName: "string",
                auth: "string",
                email: "string",
                identityToken: "string",
                password: "string",
                registryToken: "string",
                serverAddress: "string",
                userName: "string",
            }],
            platform: "string",
            pullParent: false,
            remoteContext: "string",
            remove: false,
            securityOpts: ["string"],
            sessionId: "string",
            shmSize: 0,
            squash: false,
            suppressOutput: false,
            target: "string",
            ulimits: [{
                hard: 0,
                name: "string",
                soft: 0,
            }],
            version: "string",
        },
        insecureSkipVerify: false,
        keepRemotely: false,
        name: "string",
    });
    
    type: docker:RegistryImage
    properties:
        build:
            authConfigs:
                - auth: string
                  email: string
                  hostName: string
                  identityToken: string
                  password: string
                  registryToken: string
                  serverAddress: string
                  userName: string
            buildArgs:
                string: string
            buildId: string
            cacheFroms:
                - string
            cgroupParent: string
            context: string
            cpuPeriod: 0
            cpuQuota: 0
            cpuSetCpus: string
            cpuSetMems: string
            cpuShares: 0
            dockerfile: string
            extraHosts:
                - string
            forceRemove: false
            isolation: string
            labels:
                string: string
            memory: 0
            memorySwap: 0
            networkMode: string
            noCache: false
            platform: string
            pullParent: false
            remoteContext: string
            remove: false
            securityOpts:
                - string
            sessionId: string
            shmSize: 0
            squash: false
            suppressOutput: false
            target: string
            ulimits:
                - hard: 0
                  name: string
                  soft: 0
            version: string
        insecureSkipVerify: false
        keepRemotely: false
        name: string
    

    RegistryImage Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RegistryImage resource accepts the following input properties:

    Build RegistryImageBuild
    Definition for building the image
    InsecureSkipVerify bool
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    KeepRemotely 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 registry on destroy operation. Defaults to false
    Name string
    The name of the Docker image.
    Build RegistryImageBuildArgs
    Definition for building the image
    InsecureSkipVerify bool
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    KeepRemotely 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 registry on destroy operation. Defaults to false
    Name string
    The name of the Docker image.
    build RegistryImageBuild
    Definition for building the image
    insecureSkipVerify Boolean
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keepRemotely 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 registry on destroy operation. Defaults to false
    name String
    The name of the Docker image.
    build RegistryImageBuild
    Definition for building the image
    insecureSkipVerify boolean
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keepRemotely 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 registry on destroy operation. Defaults to false
    name string
    The name of the Docker image.
    build RegistryImageBuildArgs
    Definition for building the image
    insecure_skip_verify bool
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keep_remotely 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 registry on destroy operation. Defaults to false
    name str
    The name of the Docker image.
    build Property Map
    Definition for building the image
    insecureSkipVerify Boolean
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keepRemotely 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 registry on destroy operation. Defaults to false
    name String
    The name of the Docker image.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Sha256Digest string
    The sha256 digest of the image.
    Id string
    The provider-assigned unique ID for this managed resource.
    Sha256Digest string
    The sha256 digest of the image.
    id String
    The provider-assigned unique ID for this managed resource.
    sha256Digest String
    The sha256 digest of the image.
    id string
    The provider-assigned unique ID for this managed resource.
    sha256Digest string
    The sha256 digest of the image.
    id str
    The provider-assigned unique ID for this managed resource.
    sha256_digest str
    The sha256 digest of the image.
    id String
    The provider-assigned unique ID for this managed resource.
    sha256Digest String
    The sha256 digest of the image.

    Look up Existing RegistryImage Resource

    Get an existing RegistryImage 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?: RegistryImageState, opts?: CustomResourceOptions): RegistryImage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            build: Optional[RegistryImageBuildArgs] = None,
            insecure_skip_verify: Optional[bool] = None,
            keep_remotely: Optional[bool] = None,
            name: Optional[str] = None,
            sha256_digest: Optional[str] = None) -> RegistryImage
    func GetRegistryImage(ctx *Context, name string, id IDInput, state *RegistryImageState, opts ...ResourceOption) (*RegistryImage, error)
    public static RegistryImage Get(string name, Input<string> id, RegistryImageState? state, CustomResourceOptions? opts = null)
    public static RegistryImage get(String name, Output<String> id, RegistryImageState state, CustomResourceOptions options)
    resources:  _:    type: docker:RegistryImage    get:      id: ${id}
    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 RegistryImageBuild
    Definition for building the image
    InsecureSkipVerify bool
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    KeepRemotely 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 registry on destroy operation. Defaults to false
    Name string
    The name of the Docker image.
    Sha256Digest string
    The sha256 digest of the image.
    Build RegistryImageBuildArgs
    Definition for building the image
    InsecureSkipVerify bool
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    KeepRemotely 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 registry on destroy operation. Defaults to false
    Name string
    The name of the Docker image.
    Sha256Digest string
    The sha256 digest of the image.
    build RegistryImageBuild
    Definition for building the image
    insecureSkipVerify Boolean
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keepRemotely 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 registry on destroy operation. Defaults to false
    name String
    The name of the Docker image.
    sha256Digest String
    The sha256 digest of the image.
    build RegistryImageBuild
    Definition for building the image
    insecureSkipVerify boolean
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keepRemotely 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 registry on destroy operation. Defaults to false
    name string
    The name of the Docker image.
    sha256Digest string
    The sha256 digest of the image.
    build RegistryImageBuildArgs
    Definition for building the image
    insecure_skip_verify bool
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keep_remotely 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 registry on destroy operation. Defaults to false
    name str
    The name of the Docker image.
    sha256_digest str
    The sha256 digest of the image.
    build Property Map
    Definition for building the image
    insecureSkipVerify Boolean
    If true, the verification of TLS certificates of the server/registry is disabled. Defaults to false
    keepRemotely 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 registry on destroy operation. Defaults to false
    name String
    The name of the Docker image.
    sha256Digest String
    The sha256 digest of the image.

    Supporting Types

    RegistryImageBuild, RegistryImageBuildArgs

    Context string
    The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
    AuthConfigs List<RegistryImageBuildAuthConfig>
    The configuration for the authentication
    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
    Dockerfile file. 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
    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 (default behavior)
    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
    Target string
    Set the target build stage to build
    Ulimits List<RegistryImageBuildUlimit>
    Configuration for ulimits
    Version string
    Version of the underlying builder to use
    Context string
    The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
    AuthConfigs []RegistryImageBuildAuthConfig
    The configuration for the authentication
    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
    Dockerfile file. 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
    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 (default behavior)
    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
    Target string
    Set the target build stage to build
    Ulimits []RegistryImageBuildUlimit
    Configuration for ulimits
    Version string
    Version of the underlying builder to use
    context String
    The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
    authConfigs List<RegistryImageBuildAuthConfig>
    The configuration for the authentication
    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
    Dockerfile file. 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
    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 (default behavior)
    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
    target String
    Set the target build stage to build
    ulimits List<RegistryImageBuildUlimit>
    Configuration for ulimits
    version String
    Version of the underlying builder to use
    context string
    The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
    authConfigs RegistryImageBuildAuthConfig[]
    The configuration for the authentication
    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
    Dockerfile file. 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
    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 (default behavior)
    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
    target string
    Set the target build stage to build
    ulimits RegistryImageBuildUlimit[]
    Configuration for ulimits
    version string
    Version of the underlying builder to use
    context str
    The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
    auth_configs Sequence[RegistryImageBuildAuthConfig]
    The configuration for the authentication
    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
    Dockerfile file. 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
    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 (default behavior)
    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
    target str
    Set the target build stage to build
    ulimits Sequence[RegistryImageBuildUlimit]
    Configuration for ulimits
    version str
    Version of the underlying builder to use
    context String
    The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
    authConfigs List<Property Map>
    The configuration for the authentication
    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
    Dockerfile file. 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
    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 (default behavior)
    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
    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

    RegistryImageBuildAuthConfig, RegistryImageBuildAuthConfigArgs

    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

    RegistryImageBuildUlimit, RegistryImageBuildUlimitArgs

    Hard int
    Name string
    The name of the Docker image.
    Soft int
    Hard int
    Name string
    The name of the Docker image.
    Soft int
    hard Integer
    name String
    The name of the Docker image.
    soft Integer
    hard number
    name string
    The name of the Docker image.
    soft number
    hard int
    name str
    The name of the Docker image.
    soft int
    hard Number
    name String
    The name of the Docker image.
    soft Number

    Package Details

    Repository
    Docker pulumi/pulumi-docker
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the docker Terraform Provider.
    docker logo
    Viewing docs for Docker v3.6.1 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.