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

}

Coming soon!

import pulumi
import pulumi_docker as docker

# Find the latest Ubuntu precise image.
ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage", name="ubuntu:precise")
# Start a container
ubuntu_container = docker.Container("ubuntuContainer", image=ubuntu_remote_image.latest)
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";

// Find the latest Ubuntu precise image.
const ubuntuRemoteImage = new docker.RemoteImage("ubuntu", {
    name: "ubuntu:precise",
});
// Start a container
const ubuntuContainer = new docker.Container("ubuntu", {
    image: ubuntuRemoteImage.latest,
});

Create a Container Resource

def Container(resource_name, opts=None, attach=None, capabilities=None, command=None, cpu_set=None, cpu_shares=None, destroy_grace_seconds=None, devices=None, dns=None, dns_opts=None, dns_searches=None, domainname=None, entrypoints=None, envs=None, group_adds=None, healthcheck=None, hostname=None, hosts=None, image=None, ipc_mode=None, labels=None, links=None, log_driver=None, log_opts=None, logs=None, max_retry_count=None, memory=None, memory_swap=None, mounts=None, must_run=None, name=None, network_aliases=None, network_mode=None, networks=None, networks_advanced=None, pid_mode=None, ports=None, privileged=None, publish_all_ports=None, read_only=None, restart=None, rm=None, shm_size=None, start=None, sysctls=None, tmpfs=None, ulimits=None, uploads=None, user=None, userns_mode=None, volumes=None, working_dir=None, __props__=None);
func NewContainer(ctx *Context, name string, args ContainerArgs, opts ...ResourceOption) (*Container, error)
public Container(string name, ContainerArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ContainerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Container Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Container resource accepts the following input properties:

Image string

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

Attach bool

If true attach to the container after its creation and waits the end of his execution.

Capabilities ContainerCapabilitiesArgs

See Capabilities below for details.

Command List<string>

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

CpuSet string

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

CpuShares int

CPU shares (relative weight) for the container.

DestroyGraceSeconds int

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

Devices List<ContainerDeviceArgs>

See Devices below for details.

Dns List<string>

Set of DNS servers.

DnsOpts List<string>

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

DnsSearches List<string>

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

Domainname string

Domain name of the container.

Entrypoints List<string>

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

Envs List<string>

Environment variables to set.

GroupAdds List<string>

Add additional groups to run as.

Healthcheck ContainerHealthcheckArgs

See Healthcheck below for details.

Hostname string

Hostname of the container.

Hosts List<ContainerHostArgs>

Hostname to add.

IpcMode string

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

Labels List<ContainerLabelArgs>

Adding labels.

Links List<string>

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

LogDriver string

The logging driver to use for the container. Defaults to “json-file”.

LogOpts Dictionary<string, object>

Key/value pairs to use as options for the logging driver.

Logs bool

Save the container logs (attach must be enabled).

MaxRetryCount int

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

Memory int

The memory limit for the container in MBs.

MemorySwap int
Mounts List<ContainerMountArgs>

See Mounts below for details.

MustRun bool
Name string
NetworkAliases List<string>

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworkMode string

Network mode of the container.

Networks List<string>

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworksAdvanced List<ContainerNetworksAdvancedArgs>

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

PidMode string

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

Ports List<ContainerPortArgs>

See Ports below for details.

Privileged bool

Run container in privileged mode.

PublishAllPorts bool

Publish all ports of the container.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

Restart string

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

Rm bool
ShmSize int

Size of /dev/shm in MBs.

Start bool

If true, then the Docker container will be started after creation. If false, then the container is only created.

Sysctls Dictionary<string, object>

A map of kernel parameters (sysctls) to set in the container.

Tmpfs Dictionary<string, object>

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

Ulimits List<ContainerUlimitArgs>

See Ulimits below for details.

Uploads List<ContainerUploadArgs>

See File Upload below for details.

User string

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

UsernsMode string

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

Volumes List<ContainerVolumeArgs>

See Volumes below for details.

WorkingDir string

The working directory for commands to run in

Image string

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

Attach bool

If true attach to the container after its creation and waits the end of his execution.

Capabilities ContainerCapabilities

See Capabilities below for details.

Command []string

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

CpuSet string

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

CpuShares int

CPU shares (relative weight) for the container.

DestroyGraceSeconds int

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

Devices []ContainerDevice

See Devices below for details.

Dns []string

Set of DNS servers.

DnsOpts []string

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

DnsSearches []string

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

Domainname string

Domain name of the container.

Entrypoints []string

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

Envs []string

Environment variables to set.

GroupAdds []string

Add additional groups to run as.

Healthcheck ContainerHealthcheck

See Healthcheck below for details.

Hostname string

Hostname of the container.

Hosts []ContainerHost

Hostname to add.

IpcMode string

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

Labels []ContainerLabel

Adding labels.

Links []string

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

LogDriver string

The logging driver to use for the container. Defaults to “json-file”.

LogOpts map[string]interface{}

Key/value pairs to use as options for the logging driver.

Logs bool

Save the container logs (attach must be enabled).

MaxRetryCount int

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

Memory int

The memory limit for the container in MBs.

MemorySwap int
Mounts []ContainerMount

See Mounts below for details.

MustRun bool
Name string
NetworkAliases []string

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworkMode string

Network mode of the container.

Networks []string

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworksAdvanced []ContainerNetworksAdvanced

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

PidMode string

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

Ports []ContainerPort

See Ports below for details.

Privileged bool

Run container in privileged mode.

PublishAllPorts bool

Publish all ports of the container.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

Restart string

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

Rm bool
ShmSize int

Size of /dev/shm in MBs.

Start bool

If true, then the Docker container will be started after creation. If false, then the container is only created.

Sysctls map[string]interface{}

A map of kernel parameters (sysctls) to set in the container.

Tmpfs map[string]interface{}

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

Ulimits []ContainerUlimit

See Ulimits below for details.

Uploads []ContainerUpload

See File Upload below for details.

User string

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

UsernsMode string

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

Volumes []ContainerVolume

See Volumes below for details.

WorkingDir string

The working directory for commands to run in

image string

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

attach boolean

If true attach to the container after its creation and waits the end of his execution.

capabilities ContainerCapabilities

See Capabilities below for details.

command string[]

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

cpuSet string

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

cpuShares number

CPU shares (relative weight) for the container.

destroyGraceSeconds number

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

devices ContainerDevice[]

See Devices below for details.

dns string[]

Set of DNS servers.

dnsOpts string[]

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

dnsSearches string[]

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

domainname string

Domain name of the container.

entrypoints string[]

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

envs string[]

Environment variables to set.

groupAdds string[]

Add additional groups to run as.

healthcheck ContainerHealthcheck

See Healthcheck below for details.

hostname string

Hostname of the container.

hosts ContainerHost[]

Hostname to add.

ipcMode string

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

labels ContainerLabel[]

Adding labels.

links string[]

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

logDriver string

The logging driver to use for the container. Defaults to “json-file”.

logOpts {[key: string]: any}

Key/value pairs to use as options for the logging driver.

logs boolean

Save the container logs (attach must be enabled).

maxRetryCount number

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

memory number

The memory limit for the container in MBs.

memorySwap number
mounts ContainerMount[]

See Mounts below for details.

mustRun boolean
name string
networkAliases string[]

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

networkMode string

Network mode of the container.

networks string[]

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

networksAdvanced ContainerNetworksAdvanced[]

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

pidMode string

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

ports ContainerPort[]

See Ports below for details.

privileged boolean

Run container in privileged mode.

publishAllPorts boolean

Publish all ports of the container.

readOnly boolean

If true, this volume will be readonly. Defaults to false.

restart string

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

rm boolean
shmSize number

Size of /dev/shm in MBs.

start boolean

If true, then the Docker container will be started after creation. If false, then the container is only created.

sysctls {[key: string]: any}

A map of kernel parameters (sysctls) to set in the container.

tmpfs {[key: string]: any}

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

ulimits ContainerUlimit[]

See Ulimits below for details.

uploads ContainerUpload[]

See File Upload below for details.

user string

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

usernsMode string

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

volumes ContainerVolume[]

See Volumes below for details.

workingDir string

The working directory for commands to run in

image str

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

attach bool

If true attach to the container after its creation and waits the end of his execution.

capabilities Dict[ContainerCapabilities]

See Capabilities below for details.

command List[str]

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

cpu_set str

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

cpu_shares float

CPU shares (relative weight) for the container.

destroy_grace_seconds float

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

devices List[ContainerDevice]

See Devices below for details.

dns List[str]

Set of DNS servers.

dns_opts List[str]

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

dns_searches List[str]

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

domainname str

Domain name of the container.

entrypoints List[str]

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

envs List[str]

Environment variables to set.

group_adds List[str]

Add additional groups to run as.

healthcheck Dict[ContainerHealthcheck]

See Healthcheck below for details.

hostname str

Hostname of the container.

hosts List[ContainerHost]

Hostname to add.

ipc_mode str

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

labels List[ContainerLabel]

Adding labels.

links List[str]

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

log_driver str

The logging driver to use for the container. Defaults to “json-file”.

log_opts Dict[str, Any]

Key/value pairs to use as options for the logging driver.

logs bool

Save the container logs (attach must be enabled).

max_retry_count float

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

memory float

The memory limit for the container in MBs.

memory_swap float
mounts List[ContainerMount]

See Mounts below for details.

must_run bool
name str
network_aliases List[str]

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

network_mode str

Network mode of the container.

networks List[str]

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

networks_advanced List[ContainerNetworksAdvanced]

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

pid_mode str

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

ports List[ContainerPort]

See Ports below for details.

privileged bool

Run container in privileged mode.

publish_all_ports bool

Publish all ports of the container.

read_only bool

If true, this volume will be readonly. Defaults to false.

restart str

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

rm bool
shm_size float

Size of /dev/shm in MBs.

start bool

If true, then the Docker container will be started after creation. If false, then the container is only created.

sysctls Dict[str, Any]

A map of kernel parameters (sysctls) to set in the container.

tmpfs Dict[str, Any]

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

ulimits List[ContainerUlimit]

See Ulimits below for details.

uploads List[ContainerUpload]

See File Upload below for details.

user str

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

userns_mode str

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

volumes List[ContainerVolume]

See Volumes below for details.

working_dir str

The working directory for commands to run in

Outputs

All input properties are implicitly available as output properties. Additionally, the Container resource produces the following output properties:

Bridge string

The network bridge of the container as read from its NetworkSettings.

ContainerLogs string

The logs of the container if its execution is done (attach must be disabled).

ExitCode int

The exit code of the container if its execution is done (must_run must be disabled).

Gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

Id string
The provider-assigned unique ID for this managed resource.
IpAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

IpPrefixLength int

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

NetworkDatas List<ContainerNetworkData>

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

Bridge string

The network bridge of the container as read from its NetworkSettings.

ContainerLogs string

The logs of the container if its execution is done (attach must be disabled).

ExitCode int

The exit code of the container if its execution is done (must_run must be disabled).

Gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

Id string
The provider-assigned unique ID for this managed resource.
IpAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

IpPrefixLength int

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

NetworkDatas []ContainerNetworkData

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

bridge string

The network bridge of the container as read from its NetworkSettings.

containerLogs string

The logs of the container if its execution is done (attach must be disabled).

exitCode number

The exit code of the container if its execution is done (must_run must be disabled).

gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

id string
The provider-assigned unique ID for this managed resource.
ipAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

ipPrefixLength number

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

networkDatas ContainerNetworkData[]

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

bridge str

The network bridge of the container as read from its NetworkSettings.

container_logs str

The logs of the container if its execution is done (attach must be disabled).

exit_code float

The exit code of the container if its execution is done (must_run must be disabled).

gateway str

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

id str
The provider-assigned unique ID for this managed resource.
ip_address str

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

ip_prefix_length float

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

network_datas List[ContainerNetworkData]

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

Look up an Existing Container Resource

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

public static get(name: string, id: Input<ID>, state?: ContainerState, opts?: CustomResourceOptions): Container
static get(resource_name, id, opts=None, attach=None, bridge=None, capabilities=None, command=None, container_logs=None, cpu_set=None, cpu_shares=None, destroy_grace_seconds=None, devices=None, dns=None, dns_opts=None, dns_searches=None, domainname=None, entrypoints=None, envs=None, exit_code=None, gateway=None, group_adds=None, healthcheck=None, hostname=None, hosts=None, image=None, ip_address=None, ip_prefix_length=None, ipc_mode=None, labels=None, links=None, log_driver=None, log_opts=None, logs=None, max_retry_count=None, memory=None, memory_swap=None, mounts=None, must_run=None, name=None, network_aliases=None, network_datas=None, network_mode=None, networks=None, networks_advanced=None, pid_mode=None, ports=None, privileged=None, publish_all_ports=None, read_only=None, restart=None, rm=None, shm_size=None, start=None, sysctls=None, tmpfs=None, ulimits=None, uploads=None, user=None, userns_mode=None, volumes=None, working_dir=None, __props__=None);
func GetContainer(ctx *Context, name string, id IDInput, state *ContainerState, opts ...ResourceOption) (*Container, error)
public static Container Get(string name, Input<string> id, ContainerState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Attach bool

If true attach to the container after its creation and waits the end of his execution.

Bridge string

The network bridge of the container as read from its NetworkSettings.

Capabilities ContainerCapabilitiesArgs

See Capabilities below for details.

Command List<string>

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

ContainerLogs string

The logs of the container if its execution is done (attach must be disabled).

CpuSet string

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

CpuShares int

CPU shares (relative weight) for the container.

DestroyGraceSeconds int

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

Devices List<ContainerDeviceArgs>

See Devices below for details.

Dns List<string>

Set of DNS servers.

DnsOpts List<string>

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

DnsSearches List<string>

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

Domainname string

Domain name of the container.

Entrypoints List<string>

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

Envs List<string>

Environment variables to set.

ExitCode int

The exit code of the container if its execution is done (must_run must be disabled).

Gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

GroupAdds List<string>

Add additional groups to run as.

Healthcheck ContainerHealthcheckArgs

See Healthcheck below for details.

Hostname string

Hostname of the container.

Hosts List<ContainerHostArgs>

Hostname to add.

Image string

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

IpAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

IpPrefixLength int

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

IpcMode string

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

Labels List<ContainerLabelArgs>

Adding labels.

Links List<string>

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

LogDriver string

The logging driver to use for the container. Defaults to “json-file”.

LogOpts Dictionary<string, object>

Key/value pairs to use as options for the logging driver.

Logs bool

Save the container logs (attach must be enabled).

MaxRetryCount int

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

Memory int

The memory limit for the container in MBs.

MemorySwap int
Mounts List<ContainerMountArgs>

See Mounts below for details.

MustRun bool
Name string
NetworkAliases List<string>

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworkDatas List<ContainerNetworkDataArgs>

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

NetworkMode string

Network mode of the container.

Networks List<string>

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworksAdvanced List<ContainerNetworksAdvancedArgs>

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

PidMode string

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

Ports List<ContainerPortArgs>

See Ports below for details.

Privileged bool

Run container in privileged mode.

PublishAllPorts bool

Publish all ports of the container.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

Restart string

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

Rm bool
ShmSize int

Size of /dev/shm in MBs.

Start bool

If true, then the Docker container will be started after creation. If false, then the container is only created.

Sysctls Dictionary<string, object>

A map of kernel parameters (sysctls) to set in the container.

Tmpfs Dictionary<string, object>

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

Ulimits List<ContainerUlimitArgs>

See Ulimits below for details.

Uploads List<ContainerUploadArgs>

See File Upload below for details.

User string

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

UsernsMode string

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

Volumes List<ContainerVolumeArgs>

See Volumes below for details.

WorkingDir string

The working directory for commands to run in

Attach bool

If true attach to the container after its creation and waits the end of his execution.

Bridge string

The network bridge of the container as read from its NetworkSettings.

Capabilities ContainerCapabilities

See Capabilities below for details.

Command []string

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

ContainerLogs string

The logs of the container if its execution is done (attach must be disabled).

CpuSet string

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

CpuShares int

CPU shares (relative weight) for the container.

DestroyGraceSeconds int

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

Devices []ContainerDevice

See Devices below for details.

Dns []string

Set of DNS servers.

DnsOpts []string

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

DnsSearches []string

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

Domainname string

Domain name of the container.

Entrypoints []string

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

Envs []string

Environment variables to set.

ExitCode int

The exit code of the container if its execution is done (must_run must be disabled).

Gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

GroupAdds []string

Add additional groups to run as.

Healthcheck ContainerHealthcheck

See Healthcheck below for details.

Hostname string

Hostname of the container.

Hosts []ContainerHost

Hostname to add.

Image string

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

IpAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

IpPrefixLength int

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

IpcMode string

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

Labels []ContainerLabel

Adding labels.

Links []string

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

LogDriver string

The logging driver to use for the container. Defaults to “json-file”.

LogOpts map[string]interface{}

Key/value pairs to use as options for the logging driver.

Logs bool

Save the container logs (attach must be enabled).

MaxRetryCount int

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

Memory int

The memory limit for the container in MBs.

MemorySwap int
Mounts []ContainerMount

See Mounts below for details.

MustRun bool
Name string
NetworkAliases []string

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworkDatas []ContainerNetworkData

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

NetworkMode string

Network mode of the container.

Networks []string

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

NetworksAdvanced []ContainerNetworksAdvanced

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

PidMode string

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

Ports []ContainerPort

See Ports below for details.

Privileged bool

Run container in privileged mode.

PublishAllPorts bool

Publish all ports of the container.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

Restart string

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

Rm bool
ShmSize int

Size of /dev/shm in MBs.

Start bool

If true, then the Docker container will be started after creation. If false, then the container is only created.

Sysctls map[string]interface{}

A map of kernel parameters (sysctls) to set in the container.

Tmpfs map[string]interface{}

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

Ulimits []ContainerUlimit

See Ulimits below for details.

Uploads []ContainerUpload

See File Upload below for details.

User string

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

UsernsMode string

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

Volumes []ContainerVolume

See Volumes below for details.

WorkingDir string

The working directory for commands to run in

attach boolean

If true attach to the container after its creation and waits the end of his execution.

bridge string

The network bridge of the container as read from its NetworkSettings.

capabilities ContainerCapabilities

See Capabilities below for details.

command string[]

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

containerLogs string

The logs of the container if its execution is done (attach must be disabled).

cpuSet string

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

cpuShares number

CPU shares (relative weight) for the container.

destroyGraceSeconds number

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

devices ContainerDevice[]

See Devices below for details.

dns string[]

Set of DNS servers.

dnsOpts string[]

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

dnsSearches string[]

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

domainname string

Domain name of the container.

entrypoints string[]

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

envs string[]

Environment variables to set.

exitCode number

The exit code of the container if its execution is done (must_run must be disabled).

gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

groupAdds string[]

Add additional groups to run as.

healthcheck ContainerHealthcheck

See Healthcheck below for details.

hostname string

Hostname of the container.

hosts ContainerHost[]

Hostname to add.

image string

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

ipAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

ipPrefixLength number

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

ipcMode string

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

labels ContainerLabel[]

Adding labels.

links string[]

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

logDriver string

The logging driver to use for the container. Defaults to “json-file”.

logOpts {[key: string]: any}

Key/value pairs to use as options for the logging driver.

logs boolean

Save the container logs (attach must be enabled).

maxRetryCount number

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

memory number

The memory limit for the container in MBs.

memorySwap number
mounts ContainerMount[]

See Mounts below for details.

mustRun boolean
name string
networkAliases string[]

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

networkDatas ContainerNetworkData[]

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

networkMode string

Network mode of the container.

networks string[]

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

networksAdvanced ContainerNetworksAdvanced[]

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

pidMode string

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

ports ContainerPort[]

See Ports below for details.

privileged boolean

Run container in privileged mode.

publishAllPorts boolean

Publish all ports of the container.

readOnly boolean

If true, this volume will be readonly. Defaults to false.

restart string

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

rm boolean
shmSize number

Size of /dev/shm in MBs.

start boolean

If true, then the Docker container will be started after creation. If false, then the container is only created.

sysctls {[key: string]: any}

A map of kernel parameters (sysctls) to set in the container.

tmpfs {[key: string]: any}

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

ulimits ContainerUlimit[]

See Ulimits below for details.

uploads ContainerUpload[]

See File Upload below for details.

user string

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

usernsMode string

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

volumes ContainerVolume[]

See Volumes below for details.

workingDir string

The working directory for commands to run in

attach bool

If true attach to the container after its creation and waits the end of his execution.

bridge str

The network bridge of the container as read from its NetworkSettings.

capabilities Dict[ContainerCapabilities]

See Capabilities below for details.

command List[str]

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

container_logs str

The logs of the container if its execution is done (attach must be disabled).

cpu_set str

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

cpu_shares float

CPU shares (relative weight) for the container.

destroy_grace_seconds float

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

devices List[ContainerDevice]

See Devices below for details.

dns List[str]

Set of DNS servers.

dns_opts List[str]

Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

dns_searches List[str]

Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

domainname str

Domain name of the container.

entrypoints List[str]

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be ["/usr/bin/myprogram"].

envs List[str]

Environment variables to set.

exit_code float

The exit code of the container if its execution is done (must_run must be disabled).

gateway str

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

Deprecated: Use gateway from ip_adresses_data instead. This field exposes the data of the container's first network.

group_adds List[str]

Add additional groups to run as.

healthcheck Dict[ContainerHealthcheck]

See Healthcheck below for details.

hostname str

Hostname of the container.

hosts List[ContainerHost]

Hostname to add.

image str

The ID of the image to back this container. The easiest way to get this value is to use the docker..RemoteImage resource as is shown in the example above.

ip_address str

Deprecated: Use network_data instead. The IP address of the container’s first network it.

Deprecated: Use ip_adresses_data instead. This field exposes the data of the container's first network.

ip_prefix_length float

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

Deprecated: Use ip_prefix_length from ip_adresses_data instead. This field exposes the data of the container's first network.

ipc_mode str

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

labels List[ContainerLabel]

Adding labels.

links List[str]

Set of links for link based connectivity between containers that are running on the same host.

Deprecated: The –link flag is a legacy feature of Docker. It may eventually be removed.

log_driver str

The logging driver to use for the container. Defaults to “json-file”.

log_opts Dict[str, Any]

Key/value pairs to use as options for the logging driver.

logs bool

Save the container logs (attach must be enabled).

max_retry_count float

The maximum amount of times to an attempt a restart when restart is set to “on-failure”

memory float

The memory limit for the container in MBs.

memory_swap float
mounts List[ContainerMount]

See Mounts below for details.

must_run bool
name str
network_aliases List[str]

Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

network_datas List[ContainerNetworkData]

(Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

network_mode str

Network mode of the container.

networks List[str]

Id of the networks in which the container is. Deprecated: use networks_advanced instead.

Deprecated: Use networks_advanced instead. Will be removed in v2.0.0

networks_advanced List[ContainerNetworksAdvanced]

See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

pid_mode str

The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

ports List[ContainerPort]

See Ports below for details.

privileged bool

Run container in privileged mode.

publish_all_ports bool

Publish all ports of the container.

read_only bool

If true, this volume will be readonly. Defaults to false.

restart str

The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

rm bool
shm_size float

Size of /dev/shm in MBs.

start bool

If true, then the Docker container will be started after creation. If false, then the container is only created.

sysctls Dict[str, Any]

A map of kernel parameters (sysctls) to set in the container.

tmpfs Dict[str, Any]

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

ulimits List[ContainerUlimit]

See Ulimits below for details.

uploads List[ContainerUpload]

See File Upload below for details.

user str

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

userns_mode str

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

volumes List[ContainerVolume]

See Volumes below for details.

working_dir str

The working directory for commands to run in

Supporting Types

ContainerCapabilities

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Adds List<string>

list of linux capabilities to add.

Drops List<string>

list of linux capabilities to drop.

Adds []string

list of linux capabilities to add.

Drops []string

list of linux capabilities to drop.

adds string[]

list of linux capabilities to add.

drops string[]

list of linux capabilities to drop.

adds List[str]

list of linux capabilities to add.

drops List[str]

list of linux capabilities to drop.

ContainerDevice

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

HostPath string

The path on the host where the device is located.

ContainerPath string

The path in the container where the device will be binded.

Permissions string

The cgroup permissions given to the container to access the device. Defaults to rwm.

HostPath string

The path on the host where the device is located.

ContainerPath string

The path in the container where the device will be binded.

Permissions string

The cgroup permissions given to the container to access the device. Defaults to rwm.

hostPath string

The path on the host where the device is located.

containerPath string

The path in the container where the device will be binded.

permissions string

The cgroup permissions given to the container to access the device. Defaults to rwm.

hostPath str

The path on the host where the device is located.

containerPath str

The path in the container where the device will be binded.

permissions str

The cgroup permissions given to the container to access the device. Defaults to rwm.

ContainerHealthcheck

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Tests List<string>

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

Interval string

Time between running the check (ms|s|m|h). Default: 0s.

Retries int

Consecutive failures needed to report unhealthy. Default: 0.

StartPeriod string

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

Timeout string

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

Tests []string

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

Interval string

Time between running the check (ms|s|m|h). Default: 0s.

Retries int

Consecutive failures needed to report unhealthy. Default: 0.

StartPeriod string

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

Timeout string

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

tests string[]

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

interval string

Time between running the check (ms|s|m|h). Default: 0s.

retries number

Consecutive failures needed to report unhealthy. Default: 0.

startPeriod string

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

timeout string

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

tests List[str]

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

interval str

Time between running the check (ms|s|m|h). Default: 0s.

retries float

Consecutive failures needed to report unhealthy. Default: 0.

startPeriod str

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

timeout str

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

ContainerHost

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Host string

Hostname to add.

Ip string

IP address this hostname should resolve to.

Host string

Hostname to add.

Ip string

IP address this hostname should resolve to.

host string

Hostname to add.

ip string

IP address this hostname should resolve to.

host str

Hostname to add.

ip str

IP address this hostname should resolve to.

ContainerLabel

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Label string

Name of the label

Value string

Value of the label

Label string

Name of the label

Value string

Value of the label

label string

Name of the label

value string

Value of the label

label str

Name of the label

value str

Value of the label

ContainerMount

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Target string

The container path.

Type string

The mount type: valid values are bind|volume|tmpfs.

BindOptions ContainerMountBindOptionsArgs

Optional configuration for the bind type.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

Source string

The mount source (e.g., a volume name, a host path)

TmpfsOptions ContainerMountTmpfsOptionsArgs

Optional configuration for the tmpf type.

VolumeOptions ContainerMountVolumeOptionsArgs

Optional configuration for the volume type.

Target string

The container path.

Type string

The mount type: valid values are bind|volume|tmpfs.

BindOptions ContainerMountBindOptions

Optional configuration for the bind type.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

Source string

The mount source (e.g., a volume name, a host path)

TmpfsOptions ContainerMountTmpfsOptions

Optional configuration for the tmpf type.

VolumeOptions ContainerMountVolumeOptions

Optional configuration for the volume type.

target string

The container path.

type string

The mount type: valid values are bind|volume|tmpfs.

bindOptions ContainerMountBindOptions

Optional configuration for the bind type.

readOnly boolean

If true, this volume will be readonly. Defaults to false.

source string

The mount source (e.g., a volume name, a host path)

tmpfsOptions ContainerMountTmpfsOptions

Optional configuration for the tmpf type.

volumeOptions ContainerMountVolumeOptions

Optional configuration for the volume type.

target str

The container path.

type str

The mount type: valid values are bind|volume|tmpfs.

bindOptions Dict[ContainerMountBindOptions]

Optional configuration for the bind type.

read_only bool

If true, this volume will be readonly. Defaults to false.

source str

The mount source (e.g., a volume name, a host path)

tmpfsOptions Dict[ContainerMountTmpfsOptions]

Optional configuration for the tmpf type.

volumeOptions Dict[ContainerMountVolumeOptions]

Optional configuration for the volume type.

ContainerMountBindOptions

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Propagation string

A propagation mode with the value.

Propagation string

A propagation mode with the value.

propagation string

A propagation mode with the value.

propagation str

A propagation mode with the value.

ContainerMountTmpfsOptions

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Mode int

The permission mode for the tmpfs mount in an integer.

SizeBytes int

The size for the tmpfs mount in bytes.

Mode int

The permission mode for the tmpfs mount in an integer.

SizeBytes int

The size for the tmpfs mount in bytes.

mode number

The permission mode for the tmpfs mount in an integer.

sizeBytes number

The size for the tmpfs mount in bytes.

mode float

The permission mode for the tmpfs mount in an integer.

sizeBytes float

The size for the tmpfs mount in bytes.

ContainerMountVolumeOptions

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DriverName string
DriverOptions Dictionary<string, string>

Options for the driver.

Labels List<ContainerMountVolumeOptionsLabelArgs>

Adding labels.

NoCopy bool

Whether to populate volume with data from the target.

DriverName string
DriverOptions map[string]string

Options for the driver.

Labels []ContainerMountVolumeOptionsLabel

Adding labels.

NoCopy bool

Whether to populate volume with data from the target.

driverName string
driverOptions {[key: string]: string}

Options for the driver.

labels ContainerMountVolumeOptionsLabel[]

Adding labels.

noCopy boolean

Whether to populate volume with data from the target.

driverName str
driverOptions Dict[str, str]

Options for the driver.

labels List[ContainerMountVolumeOptionsLabel]

Adding labels.

noCopy bool

Whether to populate volume with data from the target.

ContainerMountVolumeOptionsLabel

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Label string

Name of the label

Value string

Value of the label

Label string

Name of the label

Value string

Value of the label

label string

Name of the label

value string

Value of the label

label str

Name of the label

value str

Value of the label

ContainerNetworkData

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

IpAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

IpPrefixLength int

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

NetworkName string
Gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

IpAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

IpPrefixLength int

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

NetworkName string
gateway string

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

ipAddress string

Deprecated: Use network_data instead. The IP address of the container’s first network it.

ipPrefixLength number

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

networkName string
gateway str

Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

ip_address str

Deprecated: Use network_data instead. The IP address of the container’s first network it.

ip_prefix_length float

Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

networkName str

ContainerNetworksAdvanced

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the network.

Aliases List<string>

The network aliases of the container in the specific network.

Ipv4Address string

The IPV4 address of the container in the specific network.

Ipv6Address string

The IPV6 address of the container in the specific network.

Name string

The name of the network.

Aliases []string

The network aliases of the container in the specific network.

Ipv4Address string

The IPV4 address of the container in the specific network.

Ipv6Address string

The IPV6 address of the container in the specific network.

name string

The name of the network.

aliases string[]

The network aliases of the container in the specific network.

ipv4Address string

The IPV4 address of the container in the specific network.

ipv6Address string

The IPV6 address of the container in the specific network.

name str

The name of the network.

aliases List[str]

The network aliases of the container in the specific network.

ipv4Address str

The IPV4 address of the container in the specific network.

ipv6Address str

The IPV6 address of the container in the specific network.

ContainerPort

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Internal int

Port within the container.

External int

Port exposed out of the container. If not given a free random port >= 32768 will be used.

Ip string

IP address this hostname should resolve to.

Protocol string

Protocol that can be used over this port, defaults to tcp.

Internal int

Port within the container.

External int

Port exposed out of the container. If not given a free random port >= 32768 will be used.

Ip string

IP address this hostname should resolve to.

Protocol string

Protocol that can be used over this port, defaults to tcp.

internal number

Port within the container.

external number

Port exposed out of the container. If not given a free random port >= 32768 will be used.

ip string

IP address this hostname should resolve to.

protocol string

Protocol that can be used over this port, defaults to tcp.

internal float

Port within the container.

external float

Port exposed out of the container. If not given a free random port >= 32768 will be used.

ip str

IP address this hostname should resolve to.

protocol str

Protocol that can be used over this port, defaults to tcp.

ContainerUlimit

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Hard int
Name string
Soft int
Hard int
Name string
Soft int
hard number
name string
soft number
hard float
name str
soft float

ContainerUpload

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

File string

path to a file in the container.

Content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

ContentBase64 string
Executable bool

If true, the file will be uploaded with user executable permission. Defaults to false.

Source string

A filename that references a file which will be uploaded as the object content. This allows for large file uploads that do not get stored in state.

SourceHash string

If using source, this will force an update if the file content has updated but the filename has not.

File string

path to a file in the container.

Content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

ContentBase64 string
Executable bool

If true, the file will be uploaded with user executable permission. Defaults to false.

Source string

A filename that references a file which will be uploaded as the object content. This allows for large file uploads that do not get stored in state.

SourceHash string

If using source, this will force an update if the file content has updated but the filename has not.

file string

path to a file in the container.

content string

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

contentBase64 string
executable boolean

If true, the file will be uploaded with user executable permission. Defaults to false.

source string

A filename that references a file which will be uploaded as the object content. This allows for large file uploads that do not get stored in state.

sourceHash string

If using source, this will force an update if the file content has updated but the filename has not.

file str

path to a file in the container.

content str

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

contentBase64 str
executable bool

If true, the file will be uploaded with user executable permission. Defaults to false.

source str

A filename that references a file which will be uploaded as the object content. This allows for large file uploads that do not get stored in state.

sourceHash str

If using source, this will force an update if the file content has updated but the filename has not.

ContainerVolume

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ContainerPath string

The path in the container where the device will be binded.

FromContainer string

The container where the volume is coming from.

HostPath string

The path on the host where the device is located.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

VolumeName string

The name of the docker volume which should be mounted.

ContainerPath string

The path in the container where the device will be binded.

FromContainer string

The container where the volume is coming from.

HostPath string

The path on the host where the device is located.

ReadOnly bool

If true, this volume will be readonly. Defaults to false.

VolumeName string

The name of the docker volume which should be mounted.

containerPath string

The path in the container where the device will be binded.

fromContainer string

The container where the volume is coming from.

hostPath string

The path on the host where the device is located.

readOnly boolean

If true, this volume will be readonly. Defaults to false.

volumeName string

The name of the docker volume which should be mounted.

containerPath str

The path in the container where the device will be binded.

fromContainer str

The container where the volume is coming from.

hostPath str

The path on the host where the device is located.

read_only bool

If true, this volume will be readonly. Defaults to false.

volumeName str

The name of the docker volume which should be mounted.

Package Details

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