Docker
getRemoteImage
docker.RemoteImage
provides details about a specific Docker Image which need to be presend on the Docker Host
Example Usage
using Pulumi;
using Docker = Pulumi.Docker;
class MyStack : Stack
{
public MyStack()
{
var latest = Output.Create(Docker.GetRemoteImage.InvokeAsync(new Docker.GetRemoteImageArgs
{
Name = "nginx",
}));
var specific = Output.Create(Docker.GetRemoteImage.InvokeAsync(new Docker.GetRemoteImageArgs
{
Name = "nginx:1.17.6",
}));
var digest = Output.Create(Docker.GetRemoteImage.InvokeAsync(new Docker.GetRemoteImageArgs
{
Name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
}));
var tagAndDigest = Output.Create(Docker.GetRemoteImage.InvokeAsync(new Docker.GetRemoteImageArgs
{
Name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
}));
}
}
package main
import (
"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.LookupRemoteImage(ctx, &GetRemoteImageArgs{
Name: "nginx",
}, nil)
if err != nil {
return err
}
_, err = docker.LookupRemoteImage(ctx, &GetRemoteImageArgs{
Name: "nginx:1.17.6",
}, nil)
if err != nil {
return err
}
_, err = docker.LookupRemoteImage(ctx, &GetRemoteImageArgs{
Name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
}, nil)
if err != nil {
return err
}
_, err = docker.LookupRemoteImage(ctx, &GetRemoteImageArgs{
Name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
}, nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_docker as docker
latest = docker.get_remote_image(name="nginx")
specific = docker.get_remote_image(name="nginx:1.17.6")
digest = docker.get_remote_image(name="nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
tag_and_digest = docker.get_remote_image(name="nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
// uses the 'latest' tag
const latest = pulumi.output(docker.getRemoteImage({
name: "nginx",
}));
// uses a specific tag
const specific = pulumi.output(docker.getRemoteImage({
name: "nginx:1.17.6",
}));
// use the image digest
const digest = pulumi.output(docker.getRemoteImage({
name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
}));
// uses the tag and the image digest
const tagAndDigest = pulumi.output(docker.getRemoteImage({
name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
}));
Coming soon!
Using getRemoteImage
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRemoteImage(args: GetRemoteImageArgs, opts?: InvokeOptions): Promise<GetRemoteImageResult>
function getRemoteImageOutput(args: GetRemoteImageOutputArgs, opts?: InvokeOptions): Output<GetRemoteImageResult>
def get_remote_image(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRemoteImageResult
def get_remote_image_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRemoteImageResult]
func LookupRemoteImage(ctx *Context, args *LookupRemoteImageArgs, opts ...InvokeOption) (*LookupRemoteImageResult, error)
func LookupRemoteImageOutput(ctx *Context, args *LookupRemoteImageOutputArgs, opts ...InvokeOption) LookupRemoteImageResultOutput
> Note: This function is named LookupRemoteImage
in the Go SDK.
public static class GetRemoteImage
{
public static Task<GetRemoteImageResult> InvokeAsync(GetRemoteImageArgs args, InvokeOptions? opts = null)
public static Output<GetRemoteImageResult> Invoke(GetRemoteImageInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRemoteImageResult> getRemoteImage(GetRemoteImageArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: docker:index/getRemoteImage:getRemoteImage
Arguments:
# Arguments dictionary
The following arguments are supported:
- Name string
The name of the Docker image, including any tags or SHA256 repo digests.
- Name string
The name of the Docker image, including any tags or SHA256 repo digests.
- name String
The name of the Docker image, including any tags or SHA256 repo digests.
- name string
The name of the Docker image, including any tags or SHA256 repo digests.
- name str
The name of the Docker image, including any tags or SHA256 repo digests.
- name String
The name of the Docker image, including any tags or SHA256 repo digests.
getRemoteImage Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
The name of the Docker image, including any tags or SHA256 repo digests.
- Repo
Digest string The image sha256 digest in the form of
repo[:tag]@sha256:<hash>
. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
The name of the Docker image, including any tags or SHA256 repo digests.
- Repo
Digest string The image sha256 digest in the form of
repo[:tag]@sha256:<hash>
. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
- id String
The provider-assigned unique ID for this managed resource.
- name String
The name of the Docker image, including any tags or SHA256 repo digests.
- repo
Digest String The image sha256 digest in the form of
repo[:tag]@sha256:<hash>
. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
- id string
The provider-assigned unique ID for this managed resource.
- name string
The name of the Docker image, including any tags or SHA256 repo digests.
- repo
Digest string The image sha256 digest in the form of
repo[:tag]@sha256:<hash>
. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
- id str
The provider-assigned unique ID for this managed resource.
- name str
The name of the Docker image, including any tags or SHA256 repo digests.
- repo_
digest str The image sha256 digest in the form of
repo[:tag]@sha256:<hash>
. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
- id String
The provider-assigned unique ID for this managed resource.
- name String
The name of the Docker image, including any tags or SHA256 repo digests.
- repo
Digest String The image sha256 digest in the form of
repo[:tag]@sha256:<hash>
. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
Package Details
- Repository
- https://github.com/pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
docker
Terraform Provider.