RegistryImage
Provides an image/tag in a Docker registry.
Example Usage
using Pulumi;
using Docker = Pulumi.Docker;
class MyStack : Stack
{
public MyStack()
{
var helloworld = new Docker.RegistryImage("helloworld", new Docker.RegistryImageArgs
{
Build = new Docker.Inputs.RegistryImageBuildArgs
{
Context = "pathToContextFolder",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-docker/sdk/v2/go/docker"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := docker.NewRegistryImage(ctx, "helloworld", &docker.RegistryImageArgs{
Build: &docker.RegistryImageBuildArgs{
Context: pulumi.String("pathToContextFolder"),
},
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_docker as docker
helloworld = docker.RegistryImage("helloworld", build=docker.RegistryImageBuildArgs(
context="pathToContextFolder",
))
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
const helloworld = new docker.RegistryImage("helloworld", {
build: {
context: "pathToContextFolder",
},
});
Create a RegistryImage Resource
new RegistryImage(name: string, args?: RegistryImageArgs, opts?: CustomResourceOptions);
def RegistryImage(resource_name: str, opts: Optional[ResourceOptions] = None, build: Optional[RegistryImageBuildArgs] = 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)
- 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.
- opts ResourceOptions
- A bag of options that control this 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.
RegistryImage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RegistryImage resource accepts the following input properties:
- Build
Registry
Image Build Args See Build below for details.
- 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.
- Name string
type of ulimit, e.g. nofile
- Build
Registry
Image Build See Build below for details.
- 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.
- Name string
type of ulimit, e.g. nofile
- build
Registry
Image Build See Build below for details.
- 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.
- name string
type of ulimit, e.g. nofile
- build
Registry
Image Build Args See Build below for details.
- 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.
- name str
type of ulimit, e.g. nofile
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
- Id string
- The provider-assigned unique ID for this managed resource.
- Sha256Digest string
- id string
- The provider-assigned unique ID for this managed resource.
- sha256Digest string
- id str
- The provider-assigned unique ID for this managed resource.
- sha256_
digest str
Look up an 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, 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)
- 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.
The following state arguments are supported:
- Build
Registry
Image Build Args See Build below for details.
- 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.
- Name string
type of ulimit, e.g. nofile
- Sha256Digest string
- Build
Registry
Image Build See Build below for details.
- 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.
- Name string
type of ulimit, e.g. nofile
- Sha256Digest string
- build
Registry
Image Build See Build below for details.
- 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.
- name string
type of ulimit, e.g. nofile
- sha256Digest string
- build
Registry
Image Build Args See Build below for details.
- 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.
- name str
type of ulimit, e.g. nofile
- sha256_
digest str
Supporting Types
RegistryImageBuild
- Context string
- The path to the context folder
- Auth
Configs List<RegistryImage Build Auth Config Args> - See AuthConfig below for details
- Build
Args Dictionary<string, string> string pairs for build-time variables
- 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
- Cache
Froms List<string> - Images to consider as cache sources
- 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
- Dockerfile file. Default is “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 platform specific
- Labels Dictionary<string, string>
string pairs for labels
- 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 platform if server is multi-platform capable
- 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
- Remove bool
- Remove intermediate containers after a successful build (default behavior)
- Security
Opts List<string> - Security options
- Session
Id string - Shm
Size int - Size of /dev/shm in bytes. The size must be greater than 0
- Squash bool
- squash the new layers into a new image with a single new layer
- Suppress
Output bool - Suppress the build output and print image ID on success
- Target string
- Set the target build stage to build
- Ulimits
List<Registry
Image Build Ulimit Args> - See Ulimit below for details
- Version string
- Version of the unerlying builder to use
- Context string
- The path to the context folder
- Auth
Configs []RegistryImage Build Auth Config - See AuthConfig below for details
- Build
Args map[string]string string pairs for build-time variables
- 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
- Cache
Froms []string - Images to consider as cache sources
- 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
- Dockerfile file. Default is “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 platform specific
- Labels map[string]string
string pairs for labels
- 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 platform if server is multi-platform capable
- 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
- Remove bool
- Remove intermediate containers after a successful build (default behavior)
- Security
Opts []string - Security options
- Session
Id string - Shm
Size int - Size of /dev/shm in bytes. The size must be greater than 0
- Squash bool
- squash the new layers into a new image with a single new layer
- Suppress
Output bool - Suppress the build output and print image ID on success
- Target string
- Set the target build stage to build
- Ulimits
[]Registry
Image Build Ulimit - See Ulimit below for details
- Version string
- Version of the unerlying builder to use
- context string
- The path to the context folder
- auth
Configs RegistryImage Build Auth Config[] - See AuthConfig below for details
- build
Args {[key: string]: string} string pairs for build-time variables
- 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
- cache
Froms string[] - Images to consider as cache sources
- 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
- Dockerfile file. Default is “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 platform specific
- labels {[key: string]: string}
string pairs for labels
- 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 platform if server is multi-platform capable
- 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
- remove boolean
- Remove intermediate containers after a successful build (default behavior)
- security
Opts string[] - Security options
- session
Id string - shm
Size number - Size of /dev/shm in bytes. The size must be greater than 0
- squash boolean
- squash the new layers into a new image with a single new layer
- suppress
Output boolean - Suppress the build output and print image ID on success
- target string
- Set the target build stage to build
- ulimits
Registry
Image Build Ulimit[] - See Ulimit below for details
- version string
- Version of the unerlying builder to use
- context str
- The path to the context folder
- auth_
configs Sequence[RegistryImage Build Auth Config Args] - See AuthConfig below for details
- build_
args Mapping[str, str] string pairs for build-time variables
- 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_ 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
- Dockerfile file. Default is “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 platform specific
- labels Mapping[str, str]
string pairs for labels
- 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] - Security options
- session_
id str - shm_
size int - Size of /dev/shm in bytes. The size must be greater than 0
- squash bool
- squash the new layers 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[Registry
Image Build Ulimit Args] - See Ulimit below for details
- version str
- Version of the unerlying builder to use
RegistryImageBuildAuthConfig
- 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 registry password
- 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 registry password
- 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 registry password
- 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 registry password
- registry_
token str the registry token
- server_
address str the server address
- user_
name str the registry user name
RegistryImageBuildUlimit
Package Details
- Repository
- https://github.com/pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
docker
Terraform Provider.