Show / Hide Table of Contents

Class RemoteImage

Pulls a Docker image to a given Docker host from a Docker Registry.

This resource will not pull new layers of the image automatically unless used in conjunction with docker..getRegistryImage data source to update the pull_triggers field.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Find the latest Ubuntu precise image.
    var ubuntu = new Docker.RemoteImage("ubuntu", new Docker.RemoteImageArgs
    {
        Name = "ubuntu:precise",
    });
}

}

Dynamic image

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),
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RemoteImage
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Docker
Assembly: Pulumi.Docker.dll
Syntax
public class RemoteImage : CustomResource

Constructors

View Source

RemoteImage(String, RemoteImageArgs, CustomResourceOptions)

Create a RemoteImage resource with the given unique name, arguments, and options.

Declaration
public RemoteImage(string name, RemoteImageArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RemoteImageArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

KeepLocally

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

Declaration
public Output<bool?> KeepLocally { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Latest

Declaration
public Output<string> Latest { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

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

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PullTrigger

Deprecated, use pull_triggers instead.

Declaration
public Output<string> PullTrigger { get; }
Property Value
Type Description
Output<System.String>
View Source

PullTriggers

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the docker..getRegistryImage data source to trigger an image update.

Declaration
public Output<ImmutableArray<string>> PullTriggers { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, RemoteImageState, CustomResourceOptions)

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

Declaration
public static RemoteImage Get(string name, Input<string> id, RemoteImageState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RemoteImageState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RemoteImage
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.