Show / Hide Table of Contents

Namespace Pulumi.Docker

Classes

CacheFrom

CacheFrom may be used to specify build stages to use for the Docker build cache. The final image is always implicitly included.

Config

Config.Types

Config.Types.RegistryAuth

Container

Manages the lifecycle of a Docker container.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Find the latest Ubuntu precise image.
    var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new Docker.RemoteImageArgs
    {
        Name = "ubuntu:precise",
    });
    // Start a container
    var ubuntuContainer = new Docker.Container("ubuntuContainer", new Docker.ContainerArgs
    {
        Image = ubuntuRemoteImage.Latest,
    });
}

}

ContainerArgs

ContainerState

DockerBuild

DockerBuild may be used to specify detailed instructions about how to build a container.

GetNetwork

GetNetworkArgs

GetNetworkResult

GetRegistryImage

GetRegistryImageArgs

GetRegistryImageResult

Image

A Image resource represents a Docker image built locally which is published and made available via a remote Docker registry. This can be used to ensure that a Docker source directory from a local deployment environment is built and pushed to a cloud-hosted Docker registry as part of a Pulumi deployment, so that it can be referenced as an image input from other cloud services that reference Docker images - including Kubernetes Pods, AWS ECS Tasks, and Azure Container Instances.

ImageArgs

Arguments for constructing an Image resource.

ImageRegistry

Network

Manages a Docker Network. This can be used alongside docker_container to create virtual networks within the docker environment.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Create a new docker network
    var privateNetwork = new Docker.Network("privateNetwork", new Docker.NetworkArgs
    {
    });
}

}

NetworkArgs

NetworkState

Provider

The provider type for the docker package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

ProviderArgs

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

}

RemoteImageArgs

RemoteImageState

Secret

Manages the secrets of a Docker service in a swarm.

Example Usage

Basic

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Creates a secret
    var fooSecret = new Docker.Secret("fooSecret", new Docker.SecretArgs
    {
        Data = "ewogICJzZXJsaasIfQo=",
    });
}

}

SecretArgs

SecretState

Service

ServiceArgs

ServiceConfig

Manages the configuration of a Docker service in a swarm.

Basic

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Creates a config
    var fooConfig = new Docker.ServiceConfig("fooConfig", new Docker.ServiceConfigArgs
    {
        Data = "ewogICJzZXJIfQo=",
    });
}

}

ServiceConfigArgs

ServiceConfigState

ServiceState

Volume

Creates and destroys a volume in Docker. This can be used alongside docker_container to prepare volumes that can be shared across containers.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Creates a docker volume "shared_volume".
    var sharedVolume = new Docker.Volume("sharedVolume", new Docker.VolumeArgs
    {
    });
}

}

VolumeArgs

VolumeState

Back to top Copyright 2016-2020, Pulumi Corporation.