GetRegistryImage

Reads the image metadata from a Docker Registry. Used in conjunction with the docker_image resource to keep an image up to date on the latest available version of the tag.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
    public MyStack()
    {
        var ubuntuRegistryImage = Output.Create(Docker.GetRegistryImage.InvokeAsync(new Docker.GetRegistryImageArgs
        {
            Name = "ubuntu:precise",
        }));
        var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new Docker.RemoteImageArgs
        {
            Name = ubuntuRegistryImage.Apply(ubuntuRegistryImage => ubuntuRegistryImage.Name),
            PullTriggers = 
            {
                ubuntuRegistryImage.Apply(ubuntuRegistryImage => ubuntuRegistryImage.Sha256Digest),
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_docker as docker

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

const ubuntuRegistryImage = pulumi.output(docker.getRegistryImage({
    name: "ubuntu:precise",
}, { async: true }));
const ubuntuRemoteImage = new docker.RemoteImage("ubuntu", {
    name: ubuntuRegistryImage.name!,
    pullTriggers: [ubuntuRegistryImage.sha256Digest],
});

Using GetRegistryImage

function getRegistryImage(args: GetRegistryImageArgs, opts?: InvokeOptions): Promise<GetRegistryImageResult>
function  get_registry_image(name=None, opts=None)
func GetRegistryImage(ctx *Context, args *GetRegistryImageArgs, opts ...InvokeOption) (*GetRegistryImageResult, error)
public static class GetRegistryImage {
    public static Task<GetRegistryImageResult> InvokeAsync(GetRegistryImageArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Docker image, including any tags. e.g. alpine:latest

Name string

The name of the Docker image, including any tags. e.g. alpine:latest

name string

The name of the Docker image, including any tags. e.g. alpine:latest

name str

The name of the Docker image, including any tags. e.g. alpine:latest

GetRegistryImage Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Sha256Digest string
Name string
Id string

The provider-assigned unique ID for this managed resource.

Sha256Digest string
Name string
id string

The provider-assigned unique ID for this managed resource.

sha256Digest string
name string
id str

The provider-assigned unique ID for this managed resource.

sha256_digest str
name str

Package Details

Repository
https://github.com/pulumi/pulumi-docker
License
Apache-2.0
Notes
This Pulumi package is based on the docker Terraform Provider.