Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
docker.RemoteImage provides details about a specific Docker Image which need to be presend on the Docker Host
Example Usage
using System.Collections.Generic;
using Pulumi;
using Docker = Pulumi.Docker;
return await Deployment.RunAsync(() =>
{
var latest = Docker.GetRemoteImage.Invoke(new()
{
Name = "nginx",
});
var specific = Docker.GetRemoteImage.Invoke(new()
{
Name = "nginx:1.17.6",
});
var digest = Docker.GetRemoteImage.Invoke(new()
{
Name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
});
var tagAndDigest = Docker.GetRemoteImage.Invoke(new()
{
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.DockerFunctions;
import com.pulumi.docker.inputs.GetRemoteImageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()
.name("nginx")
.build());
final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()
.name("nginx:1.17.6")
.build());
final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()
.name("nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
.build());
final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()
.name("nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
.build());
}
}
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",
}));
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")
variables:
latest:
fn::invoke:
Function: docker:getRemoteImage
Arguments:
name: nginx
specific:
fn::invoke:
Function: docker:getRemoteImage
Arguments:
name: nginx:1.17.6
digest:
fn::invoke:
Function: docker:getRemoteImage
Arguments:
name: nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2
tagAndDigest:
fn::invoke:
Function: docker:getRemoteImage
Arguments:
name: nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2
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)
public static Output<GetRemoteImageResult> getRemoteImage(GetRemoteImageArgs args, InvokeOptions options)
fn::invoke:
function: docker:index/getRemoteImage:getRemoteImage
arguments:
# arguments dictionaryThe 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
- Docker pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dockerTerraform Provider.
Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
