Manages the lifecycle of docker image in a registry. You can upload images to a registry (= docker push) and also delete them again
Example Usage
Build an image with the docker.RemoteImage resource and then push it to a registry:
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
const image = new docker.RemoteImage("image", {
name: "registry.com/somename:1.0",
build: {
context: `${process.cwd()}/absolutePathToContextFolder`,
},
});
const helloworld = new docker.RegistryImage("helloworld", {
name: image.name,
keepRemotely: true,
});
import pulumi
import os
import pulumi_docker as docker
image = docker.RemoteImage("image",
name="registry.com/somename:1.0",
build={
"context": f"{os.getcwd()}/absolutePathToContextFolder",
})
helloworld = docker.RegistryImage("helloworld",
name=image.name,
keep_remotely=True)
package main
import (
"fmt"
"os"
"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 {
image, err := docker.NewRemoteImage(ctx, "image", &docker.RemoteImageArgs{
Name: pulumi.String("registry.com/somename:1.0"),
Build: &docker.RemoteImageBuildArgs{
Context: pulumi.Sprintf("%v/absolutePathToContextFolder", func(cwd string, err error) string {
if err != nil {
panic(err)
}
return cwd
}(os.Getwd())),
},
})
if err != nil {
return err
}
_, err = docker.NewRegistryImage(ctx, "helloworld", &docker.RegistryImageArgs{
Name: image.Name,
KeepRemotely: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Docker = Pulumi.Docker;
return await Deployment.RunAsync(() =>
{
var image = new Docker.RemoteImage("image", new()
{
Name = "registry.com/somename:1.0",
Build = new Docker.Inputs.RemoteImageBuildArgs
{
Context = $"{Directory.GetCurrentDirectory()}/absolutePathToContextFolder",
},
});
var helloworld = new Docker.RegistryImage("helloworld", new()
{
Name = image.Name,
KeepRemotely = true,
});
});
Example coming soon!
Example coming soon!
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,
auth_config: Optional[RegistryImageAuthConfigArgs] = None,
build: Optional[RegistryImageBuildArgs] = None,
insecure_skip_verify: Optional[bool] = None,
keep_remotely: Optional[bool] = None,
name: Optional[str] = None,
triggers: Optional[Mapping[str, 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()
{
AuthConfig = new Docker.Inputs.RegistryImageAuthConfigArgs
{
Address = "string",
Password = "string",
Username = "string",
},
Build = new Docker.Inputs.RegistryImageBuildArgs
{
Context = "string",
Isolation = "string",
Labels =
{
{ "string", "string" },
},
BuildId = "string",
BuildLogFile = "string",
Builder = "string",
CacheFroms = new[]
{
"string",
},
CacheTos = new[]
{
"string",
},
CgroupParent = "string",
AuthConfigs = new[]
{
new Docker.Inputs.RegistryImageBuildAuthConfigArgs
{
HostName = "string",
Auth = "string",
Email = "string",
IdentityToken = "string",
Password = "string",
RegistryToken = "string",
ServerAddress = "string",
UserName = "string",
},
},
Memory = 0,
CpuQuota = 0,
CpuSetCpus = "string",
CpuSetMems = "string",
CpuShares = 0,
Dockerfile = "string",
ExtraHosts = new[]
{
"string",
},
ForceRemove = false,
AdditionalContexts = new[]
{
"string",
},
BuildArgs =
{
{ "string", "string" },
},
Label =
{
{ "string", "string" },
},
CpuPeriod = 0,
MemorySwap = 0,
NetworkMode = "string",
NoCache = false,
Platform = "string",
PullParent = false,
RemoteContext = "string",
Remove = false,
Secrets = new[]
{
new Docker.Inputs.RegistryImageBuildSecretArgs
{
Id = "string",
Env = "string",
Src = "string",
},
},
SecurityOpts = new[]
{
"string",
},
SessionId = "string",
ShmSize = 0,
Squash = false,
SuppressOutput = false,
Tags = new[]
{
"string",
},
Target = "string",
Ulimits = new[]
{
new Docker.Inputs.RegistryImageBuildUlimitArgs
{
Hard = 0,
Name = "string",
Soft = 0,
},
},
Version = "string",
},
InsecureSkipVerify = false,
KeepRemotely = false,
Name = "string",
Triggers =
{
{ "string", "string" },
},
});
example, err := docker.NewRegistryImage(ctx, "registryImageResource", &docker.RegistryImageArgs{
AuthConfig: &docker.RegistryImageAuthConfigArgs{
Address: pulumi.String("string"),
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
Build: &docker.RegistryImageBuildArgs{
Context: pulumi.String("string"),
Isolation: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
BuildId: pulumi.String("string"),
BuildLogFile: pulumi.String("string"),
Builder: pulumi.String("string"),
CacheFroms: pulumi.StringArray{
pulumi.String("string"),
},
CacheTos: pulumi.StringArray{
pulumi.String("string"),
},
CgroupParent: 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"),
},
},
Memory: 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),
AdditionalContexts: pulumi.StringArray{
pulumi.String("string"),
},
BuildArgs: pulumi.StringMap{
"string": pulumi.String("string"),
},
Label: pulumi.StringMap{
"string": pulumi.String("string"),
},
CpuPeriod: pulumi.Int(0),
MemorySwap: pulumi.Int(0),
NetworkMode: pulumi.String("string"),
NoCache: pulumi.Bool(false),
Platform: pulumi.String("string"),
PullParent: pulumi.Bool(false),
RemoteContext: pulumi.String("string"),
Remove: pulumi.Bool(false),
Secrets: docker.RegistryImageBuildSecretArray{
&docker.RegistryImageBuildSecretArgs{
Id: pulumi.String("string"),
Env: pulumi.String("string"),
Src: pulumi.String("string"),
},
},
SecurityOpts: pulumi.StringArray{
pulumi.String("string"),
},
SessionId: pulumi.String("string"),
ShmSize: pulumi.Int(0),
Squash: pulumi.Bool(false),
SuppressOutput: pulumi.Bool(false),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
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"),
Triggers: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var registryImageResource = new RegistryImage("registryImageResource", RegistryImageArgs.builder()
.authConfig(RegistryImageAuthConfigArgs.builder()
.address("string")
.password("string")
.username("string")
.build())
.build(RegistryImageBuildArgs.builder()
.context("string")
.isolation("string")
.labels(Map.of("string", "string"))
.buildId("string")
.buildLogFile("string")
.builder("string")
.cacheFroms("string")
.cacheTos("string")
.cgroupParent("string")
.authConfigs(RegistryImageBuildAuthConfigArgs.builder()
.hostName("string")
.auth("string")
.email("string")
.identityToken("string")
.password("string")
.registryToken("string")
.serverAddress("string")
.userName("string")
.build())
.memory(0)
.cpuQuota(0)
.cpuSetCpus("string")
.cpuSetMems("string")
.cpuShares(0)
.dockerfile("string")
.extraHosts("string")
.forceRemove(false)
.additionalContexts("string")
.buildArgs(Map.of("string", "string"))
.label(Map.of("string", "string"))
.cpuPeriod(0)
.memorySwap(0)
.networkMode("string")
.noCache(false)
.platform("string")
.pullParent(false)
.remoteContext("string")
.remove(false)
.secrets(RegistryImageBuildSecretArgs.builder()
.id("string")
.env("string")
.src("string")
.build())
.securityOpts("string")
.sessionId("string")
.shmSize(0)
.squash(false)
.suppressOutput(false)
.tags("string")
.target("string")
.ulimits(RegistryImageBuildUlimitArgs.builder()
.hard(0)
.name("string")
.soft(0)
.build())
.version("string")
.build())
.insecureSkipVerify(false)
.keepRemotely(false)
.name("string")
.triggers(Map.of("string", "string"))
.build());
registry_image_resource = docker.RegistryImage("registryImageResource",
auth_config={
"address": "string",
"password": "string",
"username": "string",
},
build={
"context": "string",
"isolation": "string",
"labels": {
"string": "string",
},
"build_id": "string",
"build_log_file": "string",
"builder": "string",
"cache_froms": ["string"],
"cache_tos": ["string"],
"cgroup_parent": "string",
"auth_configs": [{
"host_name": "string",
"auth": "string",
"email": "string",
"identity_token": "string",
"password": "string",
"registry_token": "string",
"server_address": "string",
"user_name": "string",
}],
"memory": 0,
"cpu_quota": 0,
"cpu_set_cpus": "string",
"cpu_set_mems": "string",
"cpu_shares": 0,
"dockerfile": "string",
"extra_hosts": ["string"],
"force_remove": False,
"additional_contexts": ["string"],
"build_args": {
"string": "string",
},
"label": {
"string": "string",
},
"cpu_period": 0,
"memory_swap": 0,
"network_mode": "string",
"no_cache": False,
"platform": "string",
"pull_parent": False,
"remote_context": "string",
"remove": False,
"secrets": [{
"id": "string",
"env": "string",
"src": "string",
}],
"security_opts": ["string"],
"session_id": "string",
"shm_size": 0,
"squash": False,
"suppress_output": False,
"tags": ["string"],
"target": "string",
"ulimits": [{
"hard": 0,
"name": "string",
"soft": 0,
}],
"version": "string",
},
insecure_skip_verify=False,
keep_remotely=False,
name="string",
triggers={
"string": "string",
})
const registryImageResource = new docker.RegistryImage("registryImageResource", {
authConfig: {
address: "string",
password: "string",
username: "string",
},
build: {
context: "string",
isolation: "string",
labels: {
string: "string",
},
buildId: "string",
buildLogFile: "string",
builder: "string",
cacheFroms: ["string"],
cacheTos: ["string"],
cgroupParent: "string",
authConfigs: [{
hostName: "string",
auth: "string",
email: "string",
identityToken: "string",
password: "string",
registryToken: "string",
serverAddress: "string",
userName: "string",
}],
memory: 0,
cpuQuota: 0,
cpuSetCpus: "string",
cpuSetMems: "string",
cpuShares: 0,
dockerfile: "string",
extraHosts: ["string"],
forceRemove: false,
additionalContexts: ["string"],
buildArgs: {
string: "string",
},
label: {
string: "string",
},
cpuPeriod: 0,
memorySwap: 0,
networkMode: "string",
noCache: false,
platform: "string",
pullParent: false,
remoteContext: "string",
remove: false,
secrets: [{
id: "string",
env: "string",
src: "string",
}],
securityOpts: ["string"],
sessionId: "string",
shmSize: 0,
squash: false,
suppressOutput: false,
tags: ["string"],
target: "string",
ulimits: [{
hard: 0,
name: "string",
soft: 0,
}],
version: "string",
},
insecureSkipVerify: false,
keepRemotely: false,
name: "string",
triggers: {
string: "string",
},
});
type: docker:RegistryImage
properties:
authConfig:
address: string
password: string
username: string
build:
additionalContexts:
- string
authConfigs:
- auth: string
email: string
hostName: string
identityToken: string
password: string
registryToken: string
serverAddress: string
userName: string
buildArgs:
string: string
buildId: string
buildLogFile: string
builder: string
cacheFroms:
- string
cacheTos:
- string
cgroupParent: string
context: string
cpuPeriod: 0
cpuQuota: 0
cpuSetCpus: string
cpuSetMems: string
cpuShares: 0
dockerfile: string
extraHosts:
- string
forceRemove: false
isolation: string
label:
string: string
labels:
string: string
memory: 0
memorySwap: 0
networkMode: string
noCache: false
platform: string
pullParent: false
remoteContext: string
remove: false
secrets:
- env: string
id: string
src: string
securityOpts:
- string
sessionId: string
shmSize: 0
squash: false
suppressOutput: false
tags:
- string
target: string
ulimits:
- hard: 0
name: string
soft: 0
version: string
insecureSkipVerify: false
keepRemotely: false
name: string
triggers:
string: 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:
- Auth
Config RegistryImage Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- Build
Registry
Image Build - Insecure
Skip boolVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - 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 string
- The name of the Docker image.
- Triggers Dictionary<string, string>
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- Auth
Config RegistryImage Auth Config Args - Authentication configuration for the Docker registry. It is only used for this resource.
- Build
Registry
Image Build Args - Insecure
Skip boolVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - 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 string
- The name of the Docker image.
- Triggers map[string]string
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth
Config RegistryImage Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Registry
Image Build - insecure
Skip BooleanVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep
Remotely 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.
- triggers Map<String,String>
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth
Config RegistryImage Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Registry
Image Build - insecure
Skip booleanVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep
Remotely 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.
- triggers {[key: string]: string}
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth_
config RegistryImage Auth Config Args - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Registry
Image Build Args - insecure_
skip_ boolverify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - 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.
- triggers Mapping[str, str]
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth
Config Property Map - Authentication configuration for the Docker registry. It is only used for this resource.
- build Property Map
- insecure
Skip BooleanVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep
Remotely 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.
- triggers Map<String>
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local 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,
auth_config: Optional[RegistryImageAuthConfigArgs] = 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,
triggers: Optional[Mapping[str, str]] = None) -> RegistryImagefunc 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.
- Auth
Config RegistryImage Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- Build
Registry
Image Build - Insecure
Skip boolVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - 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 string
- The name of the Docker image.
- Sha256Digest string
- The sha256 digest of the image.
- Triggers Dictionary<string, string>
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- Auth
Config RegistryImage Auth Config Args - Authentication configuration for the Docker registry. It is only used for this resource.
- Build
Registry
Image Build Args - Insecure
Skip boolVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - 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 string
- The name of the Docker image.
- Sha256Digest string
- The sha256 digest of the image.
- Triggers map[string]string
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth
Config RegistryImage Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Registry
Image Build - insecure
Skip BooleanVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep
Remotely 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.
- triggers Map<String,String>
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth
Config RegistryImage Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Registry
Image Build - insecure
Skip booleanVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep
Remotely 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.
- triggers {[key: string]: string}
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth_
config RegistryImage Auth Config Args - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Registry
Image Build Args - insecure_
skip_ boolverify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - 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.
- triggers Mapping[str, str]
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
- auth
Config Property Map - Authentication configuration for the Docker registry. It is only used for this resource.
- build Property Map
- insecure
Skip BooleanVerify - If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep
Remotely 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.
- triggers Map<String>
- A map of arbitrary strings that, when changed, will force the
docker.RegistryImageresource to be replaced. This can be used to repush a local image
Supporting Types
RegistryImageAuthConfig, RegistryImageAuthConfigArgs
RegistryImageBuild, RegistryImageBuildArgs
- Context string
- Value to specify the build context. Currently, only a
PATHcontext is supported. You can use the helper function '${path.cwd}/context-dir'. This always refers to the local working directory, even when building images on remote hosts. Please see https://docs.docker.com/build/building/context/ for more information about build contexts. - Additional
Contexts List<string> - A list of additional build contexts. Only supported when using a buildx builder. Example:
["name=path", "src = https://example.org"}. Please see https://docs.docker.com/reference/cli/docker/buildx/build/#build-context for more information. - Auth
Configs List<RegistryImage Build Auth Config> - Authentication configuration for the Docker registry. It is only used for this resource.
- Build
Args Dictionary<string, string> - Pairs for build-time variables in the form of
ENDPOINT : "https://example.com" - Build
Id 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.
- Build
Log stringFile - Path to a file where the buildx log are written to. Only available when
builderis set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available. - Builder string
- Set the name of the buildx builder to use. If not set, the legacy builder is used.
- Cache
Froms List<string> - External cache sources (e.g.,
user/app:cache,type=local,src=path/to/dir). Only supported when using a buildx builder. - Cache
Tos List<string> - Cache export destinations (e.g.,
user/app:cache,type=local,dest=path/to/dir). Only supported when using a buildx builder. - Cgroup
Parent string - 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 stringCpus - CPUs in which to allow execution (e.g.,
0-3,0,1) - Cpu
Set stringMems - MEMs in which to allow execution (
0-3,0,1) - int
- CPU shares (relative weight)
- Dockerfile string
- Name of the Dockerfile. Defaults to
Dockerfile. - Extra
Hosts List<string> - 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 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
- Memory
Swap int - Total memory (memory + swap), -1 to enable unlimited swap
- Network
Mode string - Set the networking mode for the RUN instructions during build
- No
Cache bool - Do not use the cache when building the image
- Platform string
- Set the target platform for the build. Defaults to
GOOS/GOARCH. For more information see the docker documentation - Pull
Parent bool - Attempt to pull the image even if an older image exists locally
- Remote
Context string - A Git repository URI or HTTP/HTTPS context URI. Will be ignored if
builderis set. - Remove bool
- Remove intermediate containers after a successful build. Defaults to
true. - Secrets
List<Registry
Image Build Secret> - Set build-time secrets. Only available when you use a buildx builder.
- Security
Opts List<string> - The security options
- Session
Id string - 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
- List<string>
- Name and optionally a tag in the 'name:tag' format
- Target string
- Set the target build stage to build
- Ulimits
List<Registry
Image Build Ulimit> - Configuration for ulimits
- Version string
- Version of the underlying builder to use
- Context string
- Value to specify the build context. Currently, only a
PATHcontext is supported. You can use the helper function '${path.cwd}/context-dir'. This always refers to the local working directory, even when building images on remote hosts. Please see https://docs.docker.com/build/building/context/ for more information about build contexts. - Additional
Contexts []string - A list of additional build contexts. Only supported when using a buildx builder. Example:
["name=path", "src = https://example.org"}. Please see https://docs.docker.com/reference/cli/docker/buildx/build/#build-context for more information. - Auth
Configs []RegistryImage Build Auth Config - Authentication configuration for the Docker registry. It is only used for this resource.
- Build
Args map[string]string - Pairs for build-time variables in the form of
ENDPOINT : "https://example.com" - Build
Id 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.
- Build
Log stringFile - Path to a file where the buildx log are written to. Only available when
builderis set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available. - Builder string
- Set the name of the buildx builder to use. If not set, the legacy builder is used.
- Cache
Froms []string - External cache sources (e.g.,
user/app:cache,type=local,src=path/to/dir). Only supported when using a buildx builder. - Cache
Tos []string - Cache export destinations (e.g.,
user/app:cache,type=local,dest=path/to/dir). Only supported when using a buildx builder. - Cgroup
Parent string - 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 stringCpus - CPUs in which to allow execution (e.g.,
0-3,0,1) - Cpu
Set stringMems - MEMs in which to allow execution (
0-3,0,1) - int
- CPU shares (relative weight)
- Dockerfile string
- Name of the Dockerfile. Defaults to
Dockerfile. - Extra
Hosts []string - 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 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
- Memory
Swap int - Total memory (memory + swap), -1 to enable unlimited swap
- Network
Mode string - Set the networking mode for the RUN instructions during build
- No
Cache bool - Do not use the cache when building the image
- Platform string
- Set the target platform for the build. Defaults to
GOOS/GOARCH. For more information see the docker documentation - Pull
Parent bool - Attempt to pull the image even if an older image exists locally
- Remote
Context string - A Git repository URI or HTTP/HTTPS context URI. Will be ignored if
builderis set. - Remove bool
- Remove intermediate containers after a successful build. Defaults to
true. - Secrets
[]Registry
Image Build Secret - Set build-time secrets. Only available when you use a buildx builder.
- Security
Opts []string - The security options
- Session
Id string - 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
- []string
- Name and optionally a tag in the 'name:tag' format
- Target string
- Set the target build stage to build
- Ulimits
[]Registry
Image Build Ulimit - Configuration for ulimits
- Version string
- Version of the underlying builder to use
- context String
- Value to specify the build context. Currently, only a
PATHcontext is supported. You can use the helper function '${path.cwd}/context-dir'. This always refers to the local working directory, even when building images on remote hosts. Please see https://docs.docker.com/build/building/context/ for more information about build contexts. - additional
Contexts List<String> - A list of additional build contexts. Only supported when using a buildx builder. Example:
["name=path", "src = https://example.org"}. Please see https://docs.docker.com/reference/cli/docker/buildx/build/#build-context for more information. - auth
Configs List<RegistryImage Build Auth Config> - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Args Map<String,String> - Pairs for build-time variables in the form of
ENDPOINT : "https://example.com" - build
Id 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.
- build
Log StringFile - Path to a file where the buildx log are written to. Only available when
builderis set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available. - builder_ String
- Set the name of the buildx builder to use. If not set, the legacy builder is used.
- cache
Froms List<String> - External cache sources (e.g.,
user/app:cache,type=local,src=path/to/dir). Only supported when using a buildx builder. - cache
Tos List<String> - Cache export destinations (e.g.,
user/app:cache,type=local,dest=path/to/dir). Only supported when using a buildx builder. - cgroup
Parent String - Optional parent cgroup for the container
- cpu
Period Integer - The length of a CPU period in microseconds
- cpu
Quota Integer - Microseconds of CPU time that the container can get in a CPU period
- cpu
Set StringCpus - CPUs in which to allow execution (e.g.,
0-3,0,1) - cpu
Set StringMems - MEMs in which to allow execution (
0-3,0,1) - Integer
- CPU shares (relative weight)
- dockerfile String
- Name of the Dockerfile. Defaults to
Dockerfile. - extra
Hosts List<String> - A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]
- force
Remove 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
- memory
Swap Integer - Total memory (memory + swap), -1 to enable unlimited swap
- network
Mode String - Set the networking mode for the RUN instructions during build
- no
Cache Boolean - Do not use the cache when building the image
- platform String
- Set the target platform for the build. Defaults to
GOOS/GOARCH. For more information see the docker documentation - pull
Parent Boolean - Attempt to pull the image even if an older image exists locally
- remote
Context String - A Git repository URI or HTTP/HTTPS context URI. Will be ignored if
builderis set. - remove Boolean
- Remove intermediate containers after a successful build. Defaults to
true. - secrets
List<Registry
Image Build Secret> - Set build-time secrets. Only available when you use a buildx builder.
- security
Opts List<String> - The security options
- session
Id String - Set an ID for the build session
- shm
Size 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
- suppress
Output Boolean - Suppress the build output and print image ID on success
- List<String>
- Name and optionally a tag in the 'name:tag' format
- target String
- Set the target build stage to build
- ulimits
List<Registry
Image Build Ulimit> - Configuration for ulimits
- version String
- Version of the underlying builder to use
- context string
- Value to specify the build context. Currently, only a
PATHcontext is supported. You can use the helper function '${path.cwd}/context-dir'. This always refers to the local working directory, even when building images on remote hosts. Please see https://docs.docker.com/build/building/context/ for more information about build contexts. - additional
Contexts string[] - A list of additional build contexts. Only supported when using a buildx builder. Example:
["name=path", "src = https://example.org"}. Please see https://docs.docker.com/reference/cli/docker/buildx/build/#build-context for more information. - auth
Configs RegistryImage Build Auth Config[] - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Args {[key: string]: string} - Pairs for build-time variables in the form of
ENDPOINT : "https://example.com" - build
Id 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.
- build
Log stringFile - Path to a file where the buildx log are written to. Only available when
builderis set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available. - builder string
- Set the name of the buildx builder to use. If not set, the legacy builder is used.
- cache
Froms string[] - External cache sources (e.g.,
user/app:cache,type=local,src=path/to/dir). Only supported when using a buildx builder. - cache
Tos string[] - Cache export destinations (e.g.,
user/app:cache,type=local,dest=path/to/dir). Only supported when using a buildx builder. - cgroup
Parent string - Optional parent cgroup for the container
- cpu
Period number - The length of a CPU period in microseconds
- cpu
Quota number - Microseconds of CPU time that the container can get in a CPU period
- cpu
Set stringCpus - CPUs in which to allow execution (e.g.,
0-3,0,1) - cpu
Set stringMems - MEMs in which to allow execution (
0-3,0,1) - number
- CPU shares (relative weight)
- dockerfile string
- Name of the Dockerfile. Defaults to
Dockerfile. - extra
Hosts string[] - A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]
- force
Remove 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
- memory
Swap number - Total memory (memory + swap), -1 to enable unlimited swap
- network
Mode string - Set the networking mode for the RUN instructions during build
- no
Cache boolean - Do not use the cache when building the image
- platform string
- Set the target platform for the build. Defaults to
GOOS/GOARCH. For more information see the docker documentation - pull
Parent boolean - Attempt to pull the image even if an older image exists locally
- remote
Context string - A Git repository URI or HTTP/HTTPS context URI. Will be ignored if
builderis set. - remove boolean
- Remove intermediate containers after a successful build. Defaults to
true. - secrets
Registry
Image Build Secret[] - Set build-time secrets. Only available when you use a buildx builder.
- security
Opts string[] - The security options
- session
Id string - Set an ID for the build session
- shm
Size 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
- suppress
Output boolean - Suppress the build output and print image ID on success
- string[]
- Name and optionally a tag in the 'name:tag' format
- target string
- Set the target build stage to build
- ulimits
Registry
Image Build Ulimit[] - Configuration for ulimits
- version string
- Version of the underlying builder to use
- context str
- Value to specify the build context. Currently, only a
PATHcontext is supported. You can use the helper function '${path.cwd}/context-dir'. This always refers to the local working directory, even when building images on remote hosts. Please see https://docs.docker.com/build/building/context/ for more information about build contexts. - additional_
contexts Sequence[str] - A list of additional build contexts. Only supported when using a buildx builder. Example:
["name=path", "src = https://example.org"}. Please see https://docs.docker.com/reference/cli/docker/buildx/build/#build-context for more information. - auth_
configs Sequence[RegistryImage Build Auth Config] - Authentication configuration for the Docker registry. It is only used for this resource.
- build_
args Mapping[str, str] - Pairs for build-time variables in the form of
ENDPOINT : "https://example.com" - 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.
- build_
log_ strfile - Path to a file where the buildx log are written to. Only available when
builderis set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available. - builder str
- Set the name of the buildx builder to use. If not set, the legacy builder is used.
- cache_
froms Sequence[str] - External cache sources (e.g.,
user/app:cache,type=local,src=path/to/dir). Only supported when using a buildx builder. - cache_
tos Sequence[str] - Cache export destinations (e.g.,
user/app:cache,type=local,dest=path/to/dir). Only supported when using a buildx builder. - 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_ strcpus - CPUs in which to allow execution (e.g.,
0-3,0,1) - cpu_
set_ strmems - MEMs in which to allow execution (
0-3,0,1) - 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 the target platform for the build. Defaults to
GOOS/GOARCH. For more information see the docker documentation - 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. Will be ignored if
builderis set. - remove bool
- Remove intermediate containers after a successful build. Defaults to
true. - secrets
Sequence[Registry
Image Build Secret] - Set build-time secrets. Only available when you use a buildx builder.
- 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
- Sequence[str]
- Name and optionally a tag in the 'name:tag' format
- target str
- Set the target build stage to build
- ulimits
Sequence[Registry
Image Build Ulimit] - Configuration for ulimits
- version str
- Version of the underlying builder to use
- context String
- Value to specify the build context. Currently, only a
PATHcontext is supported. You can use the helper function '${path.cwd}/context-dir'. This always refers to the local working directory, even when building images on remote hosts. Please see https://docs.docker.com/build/building/context/ for more information about build contexts. - additional
Contexts List<String> - A list of additional build contexts. Only supported when using a buildx builder. Example:
["name=path", "src = https://example.org"}. Please see https://docs.docker.com/reference/cli/docker/buildx/build/#build-context for more information. - auth
Configs List<Property Map> - Authentication configuration for the Docker registry. It is only used for this resource.
- build
Args Map<String> - Pairs for build-time variables in the form of
ENDPOINT : "https://example.com" - build
Id 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.
- build
Log StringFile - Path to a file where the buildx log are written to. Only available when
builderis set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available. - builder String
- Set the name of the buildx builder to use. If not set, the legacy builder is used.
- cache
Froms List<String> - External cache sources (e.g.,
user/app:cache,type=local,src=path/to/dir). Only supported when using a buildx builder. - cache
Tos List<String> - Cache export destinations (e.g.,
user/app:cache,type=local,dest=path/to/dir). Only supported when using a buildx builder. - cgroup
Parent String - Optional parent cgroup for the container
- cpu
Period Number - The length of a CPU period in microseconds
- cpu
Quota Number - Microseconds of CPU time that the container can get in a CPU period
- cpu
Set StringCpus - CPUs in which to allow execution (e.g.,
0-3,0,1) - cpu
Set StringMems - MEMs in which to allow execution (
0-3,0,1) - Number
- CPU shares (relative weight)
- dockerfile String
- Name of the Dockerfile. Defaults to
Dockerfile. - extra
Hosts List<String> - A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]
- force
Remove 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
- memory
Swap Number - Total memory (memory + swap), -1 to enable unlimited swap
- network
Mode String - Set the networking mode for the RUN instructions during build
- no
Cache Boolean - Do not use the cache when building the image
- platform String
- Set the target platform for the build. Defaults to
GOOS/GOARCH. For more information see the docker documentation - pull
Parent Boolean - Attempt to pull the image even if an older image exists locally
- remote
Context String - A Git repository URI or HTTP/HTTPS context URI. Will be ignored if
builderis set. - remove Boolean
- Remove intermediate containers after a successful build. Defaults to
true. - secrets List<Property Map>
- Set build-time secrets. Only available when you use a buildx builder.
- security
Opts List<String> - The security options
- session
Id String - Set an ID for the build session
- shm
Size 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
- suppress
Output Boolean - Suppress the build output and print image ID on success
- 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
RegistryImageBuildAuthConfig, RegistryImageBuildAuthConfigArgs
- Host
Name string - hostname of the registry
- Auth string
- the auth token
- Email string
- the user emal
- Identity
Token string - the identity token
- Password string
- The password for the Docker registry.
- Registry
Token string - the registry token
- Server
Address string - the server address
- User
Name string - the registry user name
- Host
Name string - hostname of the registry
- Auth string
- the auth token
- Email string
- the user emal
- Identity
Token string - the identity token
- Password string
- The password for the Docker registry.
- Registry
Token string - the registry token
- Server
Address string - the server address
- User
Name string - the registry user name
- host
Name String - hostname of the registry
- auth String
- the auth token
- email String
- the user emal
- identity
Token String - the identity token
- password String
- The password for the Docker registry.
- registry
Token String - the registry token
- server
Address String - the server address
- user
Name String - the registry user name
- host
Name string - hostname of the registry
- auth string
- the auth token
- email string
- the user emal
- identity
Token string - the identity token
- password string
- The password for the Docker registry.
- registry
Token string - the registry token
- server
Address string - the server address
- user
Name string - the registry user name
- host_
name str - hostname of the registry
- auth str
- the auth token
- email str
- the user emal
- identity_
token str - the identity token
- password str
- The password for the Docker registry.
- registry_
token str - the registry token
- server_
address str - the server address
- user_
name str - the registry user name
- host
Name String - hostname of the registry
- auth String
- the auth token
- email String
- the user emal
- identity
Token String - the identity token
- password String
- The password for the Docker registry.
- registry
Token String - the registry token
- server
Address String - the server address
- user
Name String - the registry user name
RegistryImageBuildSecret, RegistryImageBuildSecretArgs
RegistryImageBuildUlimit, RegistryImageBuildUlimitArgs
Package Details
- Repository
- Docker pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dockerTerraform Provider.
