docker.Container
Explore with Pulumi AI
Manages the lifecycle of a Docker container.
Example Usage
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 ubuntu = new docker.Container("ubuntu", {
name: "foo",
image: ubuntuRemoteImage.imageId,
});
import pulumi
import pulumi_docker as docker
# Find the latest Ubuntu precise image.
ubuntu_remote_image = docker.RemoteImage("ubuntu", name="ubuntu:precise")
# Start a container
ubuntu = docker.Container("ubuntu",
name="foo",
image=ubuntu_remote_image.image_id)
package main
import (
"github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Find the latest Ubuntu precise image.
ubuntuRemoteImage, err := docker.NewRemoteImage(ctx, "ubuntu", &docker.RemoteImageArgs{
Name: pulumi.String("ubuntu:precise"),
})
if err != nil {
return err
}
// Start a container
_, err = docker.NewContainer(ctx, "ubuntu", &docker.ContainerArgs{
Name: pulumi.String("foo"),
Image: ubuntuRemoteImage.ImageId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Docker = Pulumi.Docker;
return await Deployment.RunAsync(() =>
{
// Find the latest Ubuntu precise image.
var ubuntuRemoteImage = new Docker.RemoteImage("ubuntu", new()
{
Name = "ubuntu:precise",
});
// Start a container
var ubuntu = new Docker.Container("ubuntu", new()
{
Name = "foo",
Image = ubuntuRemoteImage.ImageId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.RemoteImage;
import com.pulumi.docker.RemoteImageArgs;
import com.pulumi.docker.Container;
import com.pulumi.docker.ContainerArgs;
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) {
// Find the latest Ubuntu precise image.
var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder()
.name("ubuntu:precise")
.build());
// Start a container
var ubuntu = new Container("ubuntu", ContainerArgs.builder()
.name("foo")
.image(ubuntuRemoteImage.imageId())
.build());
}
}
resources:
# Start a container
ubuntu:
type: docker:Container
properties:
name: foo
image: ${ubuntuRemoteImage.imageId}
# Find the latest Ubuntu precise image.
ubuntuRemoteImage:
type: docker:RemoteImage
name: ubuntu
properties:
name: ubuntu:precise
Create Container Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Container(name: string, args: ContainerArgs, opts?: CustomResourceOptions);
@overload
def Container(resource_name: str,
args: ContainerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Container(resource_name: str,
opts: Optional[ResourceOptions] = None,
image: Optional[str] = None,
attach: Optional[bool] = None,
capabilities: Optional[ContainerCapabilitiesArgs] = None,
cgroupns_mode: Optional[str] = None,
command: Optional[Sequence[str]] = None,
container_read_refresh_timeout_milliseconds: Optional[int] = None,
cpu_set: Optional[str] = None,
cpu_shares: Optional[int] = None,
destroy_grace_seconds: Optional[int] = None,
devices: Optional[Sequence[ContainerDeviceArgs]] = None,
dns: Optional[Sequence[str]] = None,
dns_opts: Optional[Sequence[str]] = None,
dns_searches: Optional[Sequence[str]] = None,
domainname: Optional[str] = None,
entrypoints: Optional[Sequence[str]] = None,
envs: Optional[Sequence[str]] = None,
gpus: Optional[str] = None,
group_adds: Optional[Sequence[str]] = None,
healthcheck: Optional[ContainerHealthcheckArgs] = None,
hostname: Optional[str] = None,
hosts: Optional[Sequence[ContainerHostArgs]] = None,
init: Optional[bool] = None,
ipc_mode: Optional[str] = None,
labels: Optional[Sequence[ContainerLabelArgs]] = None,
log_driver: Optional[str] = None,
log_opts: Optional[Mapping[str, str]] = None,
logs: Optional[bool] = None,
max_retry_count: Optional[int] = None,
memory: Optional[int] = None,
memory_swap: Optional[int] = None,
mounts: Optional[Sequence[ContainerMountArgs]] = None,
must_run: Optional[bool] = None,
name: Optional[str] = None,
network_mode: Optional[str] = None,
networks_advanced: Optional[Sequence[ContainerNetworksAdvancedArgs]] = None,
pid_mode: Optional[str] = None,
ports: Optional[Sequence[ContainerPortArgs]] = None,
privileged: Optional[bool] = None,
publish_all_ports: Optional[bool] = None,
read_only: Optional[bool] = None,
remove_volumes: Optional[bool] = None,
restart: Optional[str] = None,
rm: Optional[bool] = None,
runtime: Optional[str] = None,
security_opts: Optional[Sequence[str]] = None,
shm_size: Optional[int] = None,
start: Optional[bool] = None,
stdin_open: Optional[bool] = None,
stop_signal: Optional[str] = None,
stop_timeout: Optional[int] = None,
storage_opts: Optional[Mapping[str, str]] = None,
sysctls: Optional[Mapping[str, str]] = None,
tmpfs: Optional[Mapping[str, str]] = None,
tty: Optional[bool] = None,
ulimits: Optional[Sequence[ContainerUlimitArgs]] = None,
uploads: Optional[Sequence[ContainerUploadArgs]] = None,
user: Optional[str] = None,
userns_mode: Optional[str] = None,
volumes: Optional[Sequence[ContainerVolumeArgs]] = None,
wait: Optional[bool] = None,
wait_timeout: Optional[int] = None,
working_dir: Optional[str] = None)
func NewContainer(ctx *Context, name string, args ContainerArgs, opts ...ResourceOption) (*Container, error)
public Container(string name, ContainerArgs args, CustomResourceOptions? opts = null)
public Container(String name, ContainerArgs args)
public Container(String name, ContainerArgs args, CustomResourceOptions options)
type: docker:Container
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ContainerArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. ContainerArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ContainerArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ContainerArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. ContainerArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var containerResource = new Docker.Container("containerResource", new()
{
Image = "string",
Attach = false,
Capabilities = new Docker.Inputs.ContainerCapabilitiesArgs
{
Adds = new[]
{
"string",
},
Drops = new[]
{
"string",
},
},
CgroupnsMode = "string",
Command = new[]
{
"string",
},
ContainerReadRefreshTimeoutMilliseconds = 0,
CpuSet = "string",
CpuShares = 0,
DestroyGraceSeconds = 0,
Devices = new[]
{
new Docker.Inputs.ContainerDeviceArgs
{
HostPath = "string",
ContainerPath = "string",
Permissions = "string",
},
},
Dns = new[]
{
"string",
},
DnsOpts = new[]
{
"string",
},
DnsSearches = new[]
{
"string",
},
Domainname = "string",
Entrypoints = new[]
{
"string",
},
Envs = new[]
{
"string",
},
Gpus = "string",
GroupAdds = new[]
{
"string",
},
Healthcheck = new Docker.Inputs.ContainerHealthcheckArgs
{
Tests = new[]
{
"string",
},
Interval = "string",
Retries = 0,
StartPeriod = "string",
Timeout = "string",
},
Hostname = "string",
Hosts = new[]
{
new Docker.Inputs.ContainerHostArgs
{
Host = "string",
Ip = "string",
},
},
Init = false,
IpcMode = "string",
Labels = new[]
{
new Docker.Inputs.ContainerLabelArgs
{
Label = "string",
Value = "string",
},
},
LogDriver = "string",
LogOpts =
{
{ "string", "string" },
},
Logs = false,
MaxRetryCount = 0,
Memory = 0,
MemorySwap = 0,
Mounts = new[]
{
new Docker.Inputs.ContainerMountArgs
{
Target = "string",
Type = "string",
BindOptions = new Docker.Inputs.ContainerMountBindOptionsArgs
{
Propagation = "string",
},
ReadOnly = false,
Source = "string",
TmpfsOptions = new Docker.Inputs.ContainerMountTmpfsOptionsArgs
{
Mode = 0,
SizeBytes = 0,
},
VolumeOptions = new Docker.Inputs.ContainerMountVolumeOptionsArgs
{
DriverName = "string",
DriverOptions =
{
{ "string", "string" },
},
Labels = new[]
{
new Docker.Inputs.ContainerMountVolumeOptionsLabelArgs
{
Label = "string",
Value = "string",
},
},
NoCopy = false,
},
},
},
MustRun = false,
Name = "string",
NetworkMode = "string",
NetworksAdvanced = new[]
{
new Docker.Inputs.ContainerNetworksAdvancedArgs
{
Name = "string",
Aliases = new[]
{
"string",
},
Ipv4Address = "string",
Ipv6Address = "string",
},
},
PidMode = "string",
Ports = new[]
{
new Docker.Inputs.ContainerPortArgs
{
Internal = 0,
External = 0,
Ip = "string",
Protocol = "string",
},
},
Privileged = false,
PublishAllPorts = false,
ReadOnly = false,
RemoveVolumes = false,
Restart = "string",
Rm = false,
Runtime = "string",
SecurityOpts = new[]
{
"string",
},
ShmSize = 0,
Start = false,
StdinOpen = false,
StopSignal = "string",
StopTimeout = 0,
StorageOpts =
{
{ "string", "string" },
},
Sysctls =
{
{ "string", "string" },
},
Tmpfs =
{
{ "string", "string" },
},
Tty = false,
Ulimits = new[]
{
new Docker.Inputs.ContainerUlimitArgs
{
Hard = 0,
Name = "string",
Soft = 0,
},
},
Uploads = new[]
{
new Docker.Inputs.ContainerUploadArgs
{
File = "string",
Content = "string",
ContentBase64 = "string",
Executable = false,
Source = "string",
SourceHash = "string",
},
},
User = "string",
UsernsMode = "string",
Volumes = new[]
{
new Docker.Inputs.ContainerVolumeArgs
{
ContainerPath = "string",
FromContainer = "string",
HostPath = "string",
ReadOnly = false,
VolumeName = "string",
},
},
Wait = false,
WaitTimeout = 0,
WorkingDir = "string",
});
example, err := docker.NewContainer(ctx, "containerResource", &docker.ContainerArgs{
Image: pulumi.String("string"),
Attach: pulumi.Bool(false),
Capabilities: &docker.ContainerCapabilitiesArgs{
Adds: pulumi.StringArray{
pulumi.String("string"),
},
Drops: pulumi.StringArray{
pulumi.String("string"),
},
},
CgroupnsMode: pulumi.String("string"),
Command: pulumi.StringArray{
pulumi.String("string"),
},
ContainerReadRefreshTimeoutMilliseconds: pulumi.Int(0),
CpuSet: pulumi.String("string"),
CpuShares: pulumi.Int(0),
DestroyGraceSeconds: pulumi.Int(0),
Devices: docker.ContainerDeviceArray{
&docker.ContainerDeviceArgs{
HostPath: pulumi.String("string"),
ContainerPath: pulumi.String("string"),
Permissions: pulumi.String("string"),
},
},
Dns: pulumi.StringArray{
pulumi.String("string"),
},
DnsOpts: pulumi.StringArray{
pulumi.String("string"),
},
DnsSearches: pulumi.StringArray{
pulumi.String("string"),
},
Domainname: pulumi.String("string"),
Entrypoints: pulumi.StringArray{
pulumi.String("string"),
},
Envs: pulumi.StringArray{
pulumi.String("string"),
},
Gpus: pulumi.String("string"),
GroupAdds: pulumi.StringArray{
pulumi.String("string"),
},
Healthcheck: &docker.ContainerHealthcheckArgs{
Tests: pulumi.StringArray{
pulumi.String("string"),
},
Interval: pulumi.String("string"),
Retries: pulumi.Int(0),
StartPeriod: pulumi.String("string"),
Timeout: pulumi.String("string"),
},
Hostname: pulumi.String("string"),
Hosts: docker.ContainerHostArray{
&docker.ContainerHostArgs{
Host: pulumi.String("string"),
Ip: pulumi.String("string"),
},
},
Init: pulumi.Bool(false),
IpcMode: pulumi.String("string"),
Labels: docker.ContainerLabelArray{
&docker.ContainerLabelArgs{
Label: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
LogDriver: pulumi.String("string"),
LogOpts: pulumi.StringMap{
"string": pulumi.String("string"),
},
Logs: pulumi.Bool(false),
MaxRetryCount: pulumi.Int(0),
Memory: pulumi.Int(0),
MemorySwap: pulumi.Int(0),
Mounts: docker.ContainerMountArray{
&docker.ContainerMountArgs{
Target: pulumi.String("string"),
Type: pulumi.String("string"),
BindOptions: &docker.ContainerMountBindOptionsArgs{
Propagation: pulumi.String("string"),
},
ReadOnly: pulumi.Bool(false),
Source: pulumi.String("string"),
TmpfsOptions: &docker.ContainerMountTmpfsOptionsArgs{
Mode: pulumi.Int(0),
SizeBytes: pulumi.Int(0),
},
VolumeOptions: &docker.ContainerMountVolumeOptionsArgs{
DriverName: pulumi.String("string"),
DriverOptions: pulumi.StringMap{
"string": pulumi.String("string"),
},
Labels: docker.ContainerMountVolumeOptionsLabelArray{
&docker.ContainerMountVolumeOptionsLabelArgs{
Label: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
NoCopy: pulumi.Bool(false),
},
},
},
MustRun: pulumi.Bool(false),
Name: pulumi.String("string"),
NetworkMode: pulumi.String("string"),
NetworksAdvanced: docker.ContainerNetworksAdvancedArray{
&docker.ContainerNetworksAdvancedArgs{
Name: pulumi.String("string"),
Aliases: pulumi.StringArray{
pulumi.String("string"),
},
Ipv4Address: pulumi.String("string"),
Ipv6Address: pulumi.String("string"),
},
},
PidMode: pulumi.String("string"),
Ports: docker.ContainerPortArray{
&docker.ContainerPortArgs{
Internal: pulumi.Int(0),
External: pulumi.Int(0),
Ip: pulumi.String("string"),
Protocol: pulumi.String("string"),
},
},
Privileged: pulumi.Bool(false),
PublishAllPorts: pulumi.Bool(false),
ReadOnly: pulumi.Bool(false),
RemoveVolumes: pulumi.Bool(false),
Restart: pulumi.String("string"),
Rm: pulumi.Bool(false),
Runtime: pulumi.String("string"),
SecurityOpts: pulumi.StringArray{
pulumi.String("string"),
},
ShmSize: pulumi.Int(0),
Start: pulumi.Bool(false),
StdinOpen: pulumi.Bool(false),
StopSignal: pulumi.String("string"),
StopTimeout: pulumi.Int(0),
StorageOpts: pulumi.StringMap{
"string": pulumi.String("string"),
},
Sysctls: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tmpfs: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tty: pulumi.Bool(false),
Ulimits: docker.ContainerUlimitArray{
&docker.ContainerUlimitArgs{
Hard: pulumi.Int(0),
Name: pulumi.String("string"),
Soft: pulumi.Int(0),
},
},
Uploads: docker.ContainerUploadArray{
&docker.ContainerUploadArgs{
File: pulumi.String("string"),
Content: pulumi.String("string"),
ContentBase64: pulumi.String("string"),
Executable: pulumi.Bool(false),
Source: pulumi.String("string"),
SourceHash: pulumi.String("string"),
},
},
User: pulumi.String("string"),
UsernsMode: pulumi.String("string"),
Volumes: docker.ContainerVolumeArray{
&docker.ContainerVolumeArgs{
ContainerPath: pulumi.String("string"),
FromContainer: pulumi.String("string"),
HostPath: pulumi.String("string"),
ReadOnly: pulumi.Bool(false),
VolumeName: pulumi.String("string"),
},
},
Wait: pulumi.Bool(false),
WaitTimeout: pulumi.Int(0),
WorkingDir: pulumi.String("string"),
})
var containerResource = new Container("containerResource", ContainerArgs.builder()
.image("string")
.attach(false)
.capabilities(ContainerCapabilitiesArgs.builder()
.adds("string")
.drops("string")
.build())
.cgroupnsMode("string")
.command("string")
.containerReadRefreshTimeoutMilliseconds(0)
.cpuSet("string")
.cpuShares(0)
.destroyGraceSeconds(0)
.devices(ContainerDeviceArgs.builder()
.hostPath("string")
.containerPath("string")
.permissions("string")
.build())
.dns("string")
.dnsOpts("string")
.dnsSearches("string")
.domainname("string")
.entrypoints("string")
.envs("string")
.gpus("string")
.groupAdds("string")
.healthcheck(ContainerHealthcheckArgs.builder()
.tests("string")
.interval("string")
.retries(0)
.startPeriod("string")
.timeout("string")
.build())
.hostname("string")
.hosts(ContainerHostArgs.builder()
.host("string")
.ip("string")
.build())
.init(false)
.ipcMode("string")
.labels(ContainerLabelArgs.builder()
.label("string")
.value("string")
.build())
.logDriver("string")
.logOpts(Map.of("string", "string"))
.logs(false)
.maxRetryCount(0)
.memory(0)
.memorySwap(0)
.mounts(ContainerMountArgs.builder()
.target("string")
.type("string")
.bindOptions(ContainerMountBindOptionsArgs.builder()
.propagation("string")
.build())
.readOnly(false)
.source("string")
.tmpfsOptions(ContainerMountTmpfsOptionsArgs.builder()
.mode(0)
.sizeBytes(0)
.build())
.volumeOptions(ContainerMountVolumeOptionsArgs.builder()
.driverName("string")
.driverOptions(Map.of("string", "string"))
.labels(ContainerMountVolumeOptionsLabelArgs.builder()
.label("string")
.value("string")
.build())
.noCopy(false)
.build())
.build())
.mustRun(false)
.name("string")
.networkMode("string")
.networksAdvanced(ContainerNetworksAdvancedArgs.builder()
.name("string")
.aliases("string")
.ipv4Address("string")
.ipv6Address("string")
.build())
.pidMode("string")
.ports(ContainerPortArgs.builder()
.internal(0)
.external(0)
.ip("string")
.protocol("string")
.build())
.privileged(false)
.publishAllPorts(false)
.readOnly(false)
.removeVolumes(false)
.restart("string")
.rm(false)
.runtime("string")
.securityOpts("string")
.shmSize(0)
.start(false)
.stdinOpen(false)
.stopSignal("string")
.stopTimeout(0)
.storageOpts(Map.of("string", "string"))
.sysctls(Map.of("string", "string"))
.tmpfs(Map.of("string", "string"))
.tty(false)
.ulimits(ContainerUlimitArgs.builder()
.hard(0)
.name("string")
.soft(0)
.build())
.uploads(ContainerUploadArgs.builder()
.file("string")
.content("string")
.contentBase64("string")
.executable(false)
.source("string")
.sourceHash("string")
.build())
.user("string")
.usernsMode("string")
.volumes(ContainerVolumeArgs.builder()
.containerPath("string")
.fromContainer("string")
.hostPath("string")
.readOnly(false)
.volumeName("string")
.build())
.wait(false)
.waitTimeout(0)
.workingDir("string")
.build());
container_resource = docker.Container("containerResource",
image="string",
attach=False,
capabilities={
"adds": ["string"],
"drops": ["string"],
},
cgroupns_mode="string",
command=["string"],
container_read_refresh_timeout_milliseconds=0,
cpu_set="string",
cpu_shares=0,
destroy_grace_seconds=0,
devices=[{
"host_path": "string",
"container_path": "string",
"permissions": "string",
}],
dns=["string"],
dns_opts=["string"],
dns_searches=["string"],
domainname="string",
entrypoints=["string"],
envs=["string"],
gpus="string",
group_adds=["string"],
healthcheck={
"tests": ["string"],
"interval": "string",
"retries": 0,
"start_period": "string",
"timeout": "string",
},
hostname="string",
hosts=[{
"host": "string",
"ip": "string",
}],
init=False,
ipc_mode="string",
labels=[{
"label": "string",
"value": "string",
}],
log_driver="string",
log_opts={
"string": "string",
},
logs=False,
max_retry_count=0,
memory=0,
memory_swap=0,
mounts=[{
"target": "string",
"type": "string",
"bind_options": {
"propagation": "string",
},
"read_only": False,
"source": "string",
"tmpfs_options": {
"mode": 0,
"size_bytes": 0,
},
"volume_options": {
"driver_name": "string",
"driver_options": {
"string": "string",
},
"labels": [{
"label": "string",
"value": "string",
}],
"no_copy": False,
},
}],
must_run=False,
name="string",
network_mode="string",
networks_advanced=[{
"name": "string",
"aliases": ["string"],
"ipv4_address": "string",
"ipv6_address": "string",
}],
pid_mode="string",
ports=[{
"internal": 0,
"external": 0,
"ip": "string",
"protocol": "string",
}],
privileged=False,
publish_all_ports=False,
read_only=False,
remove_volumes=False,
restart="string",
rm=False,
runtime="string",
security_opts=["string"],
shm_size=0,
start=False,
stdin_open=False,
stop_signal="string",
stop_timeout=0,
storage_opts={
"string": "string",
},
sysctls={
"string": "string",
},
tmpfs={
"string": "string",
},
tty=False,
ulimits=[{
"hard": 0,
"name": "string",
"soft": 0,
}],
uploads=[{
"file": "string",
"content": "string",
"content_base64": "string",
"executable": False,
"source": "string",
"source_hash": "string",
}],
user="string",
userns_mode="string",
volumes=[{
"container_path": "string",
"from_container": "string",
"host_path": "string",
"read_only": False,
"volume_name": "string",
}],
wait=False,
wait_timeout=0,
working_dir="string")
const containerResource = new docker.Container("containerResource", {
image: "string",
attach: false,
capabilities: {
adds: ["string"],
drops: ["string"],
},
cgroupnsMode: "string",
command: ["string"],
containerReadRefreshTimeoutMilliseconds: 0,
cpuSet: "string",
cpuShares: 0,
destroyGraceSeconds: 0,
devices: [{
hostPath: "string",
containerPath: "string",
permissions: "string",
}],
dns: ["string"],
dnsOpts: ["string"],
dnsSearches: ["string"],
domainname: "string",
entrypoints: ["string"],
envs: ["string"],
gpus: "string",
groupAdds: ["string"],
healthcheck: {
tests: ["string"],
interval: "string",
retries: 0,
startPeriod: "string",
timeout: "string",
},
hostname: "string",
hosts: [{
host: "string",
ip: "string",
}],
init: false,
ipcMode: "string",
labels: [{
label: "string",
value: "string",
}],
logDriver: "string",
logOpts: {
string: "string",
},
logs: false,
maxRetryCount: 0,
memory: 0,
memorySwap: 0,
mounts: [{
target: "string",
type: "string",
bindOptions: {
propagation: "string",
},
readOnly: false,
source: "string",
tmpfsOptions: {
mode: 0,
sizeBytes: 0,
},
volumeOptions: {
driverName: "string",
driverOptions: {
string: "string",
},
labels: [{
label: "string",
value: "string",
}],
noCopy: false,
},
}],
mustRun: false,
name: "string",
networkMode: "string",
networksAdvanced: [{
name: "string",
aliases: ["string"],
ipv4Address: "string",
ipv6Address: "string",
}],
pidMode: "string",
ports: [{
internal: 0,
external: 0,
ip: "string",
protocol: "string",
}],
privileged: false,
publishAllPorts: false,
readOnly: false,
removeVolumes: false,
restart: "string",
rm: false,
runtime: "string",
securityOpts: ["string"],
shmSize: 0,
start: false,
stdinOpen: false,
stopSignal: "string",
stopTimeout: 0,
storageOpts: {
string: "string",
},
sysctls: {
string: "string",
},
tmpfs: {
string: "string",
},
tty: false,
ulimits: [{
hard: 0,
name: "string",
soft: 0,
}],
uploads: [{
file: "string",
content: "string",
contentBase64: "string",
executable: false,
source: "string",
sourceHash: "string",
}],
user: "string",
usernsMode: "string",
volumes: [{
containerPath: "string",
fromContainer: "string",
hostPath: "string",
readOnly: false,
volumeName: "string",
}],
wait: false,
waitTimeout: 0,
workingDir: "string",
});
type: docker:Container
properties:
attach: false
capabilities:
adds:
- string
drops:
- string
cgroupnsMode: string
command:
- string
containerReadRefreshTimeoutMilliseconds: 0
cpuSet: string
cpuShares: 0
destroyGraceSeconds: 0
devices:
- containerPath: string
hostPath: string
permissions: string
dns:
- string
dnsOpts:
- string
dnsSearches:
- string
domainname: string
entrypoints:
- string
envs:
- string
gpus: string
groupAdds:
- string
healthcheck:
interval: string
retries: 0
startPeriod: string
tests:
- string
timeout: string
hostname: string
hosts:
- host: string
ip: string
image: string
init: false
ipcMode: string
labels:
- label: string
value: string
logDriver: string
logOpts:
string: string
logs: false
maxRetryCount: 0
memory: 0
memorySwap: 0
mounts:
- bindOptions:
propagation: string
readOnly: false
source: string
target: string
tmpfsOptions:
mode: 0
sizeBytes: 0
type: string
volumeOptions:
driverName: string
driverOptions:
string: string
labels:
- label: string
value: string
noCopy: false
mustRun: false
name: string
networkMode: string
networksAdvanced:
- aliases:
- string
ipv4Address: string
ipv6Address: string
name: string
pidMode: string
ports:
- external: 0
internal: 0
ip: string
protocol: string
privileged: false
publishAllPorts: false
readOnly: false
removeVolumes: false
restart: string
rm: false
runtime: string
securityOpts:
- string
shmSize: 0
start: false
stdinOpen: false
stopSignal: string
stopTimeout: 0
storageOpts:
string: string
sysctls:
string: string
tmpfs:
string: string
tty: false
ulimits:
- hard: 0
name: string
soft: 0
uploads:
- content: string
contentBase64: string
executable: false
file: string
source: string
sourceHash: string
user: string
usernsMode: string
volumes:
- containerPath: string
fromContainer: string
hostPath: string
readOnly: false
volumeName: string
wait: false
waitTimeout: 0
workingDir: string
Container Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Container resource accepts the following input properties:
- Image
This property is required. Changes to this property will trigger replacement.
- 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. - Attach bool
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - Capabilities
Changes to this property will trigger replacement.
Capabilities - Add or drop certrain linux capabilities.
- Cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - Command
Changes to this property will trigger replacement.
- 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.con"]
. - Container
Read intRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- Cpu
Set string - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - int
- CPU shares (relative weight) for the container.
- Destroy
Grace intSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - Devices
Changes to this property will trigger replacement.
Device> - Bind devices to the container.
- Dns
Changes to this property will trigger replacement.
- DNS servers to use.
- Dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - Dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- Domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- Entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - Envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- Gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - Group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- Healthcheck
Container
Healthcheck - A test to perform to check that the container is healthy
- Hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- Hosts
Changes to this property will trigger replacement.
Host> - Additional hosts to add to the container.
- Init bool
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - Ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - Labels
Changes to this property will trigger replacement.
Label> - User-defined key/value metadata
- Log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- Log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- Logs bool
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - Max
Retry intCount - 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.
- Memory
Swap int - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - Mounts
Changes to this property will trigger replacement.
Mount> - Specification for mounts to be added to containers created as part of the service.
- Must
Run bool - Name
Changes to this property will trigger replacement.
- The name of the container.
- Network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- Networks
Advanced Changes to this property will trigger replacement.
Networks Advanced> - The networks the container is attached to
- Pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - Ports
Changes to this property will trigger replacement.
Port> - Publish a container's port(s) to the host.
- Privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - Publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- Read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - Remove
Volumes bool - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - Restart string
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - Rm bool
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - Runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- Security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- Shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - Start bool
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - Stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - Stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - Stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- Storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- Sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- Tmpfs Dictionary<string, string>
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - Tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - Ulimits
Changes to this property will trigger replacement.
Ulimit> - Ulimit options to add.
- Uploads
Changes to this property will trigger replacement.
Upload> - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - User
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - Userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- Volumes
Changes to this property will trigger replacement.
Volume> - Spec for mounting volumes in the container.
- Wait bool
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - Wait
Timeout int - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - Working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- Image
This property is required. Changes to this property will trigger replacement.
- 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. - Attach bool
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - Capabilities
Changes to this property will trigger replacement.
Capabilities Args - Add or drop certrain linux capabilities.
- Cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - Command
Changes to this property will trigger replacement.
- 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.con"]
. - Container
Read intRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- Cpu
Set string - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - int
- CPU shares (relative weight) for the container.
- Destroy
Grace intSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - Devices
Changes to this property will trigger replacement.
Device Args - Bind devices to the container.
- Dns
Changes to this property will trigger replacement.
- DNS servers to use.
- Dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - Dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- Domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- Entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - Envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- Gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - Group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- Healthcheck
Container
Healthcheck Args - A test to perform to check that the container is healthy
- Hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- Hosts
Changes to this property will trigger replacement.
Host Args - Additional hosts to add to the container.
- Init bool
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - Ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - Labels
Changes to this property will trigger replacement.
Label Args - User-defined key/value metadata
- Log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- Log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- Logs bool
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - Max
Retry intCount - 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.
- Memory
Swap int - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - Mounts
Changes to this property will trigger replacement.
Mount Args - Specification for mounts to be added to containers created as part of the service.
- Must
Run bool - Name
Changes to this property will trigger replacement.
- The name of the container.
- Network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- Networks
Advanced Changes to this property will trigger replacement.
Networks Advanced Args - The networks the container is attached to
- Pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - Ports
Changes to this property will trigger replacement.
Port Args - Publish a container's port(s) to the host.
- Privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - Publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- Read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - Remove
Volumes bool - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - Restart string
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - Rm bool
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - Runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- Security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- Shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - Start bool
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - Stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - Stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - Stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- Storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- Sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- Tmpfs map[string]string
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - Tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - Ulimits
Changes to this property will trigger replacement.
Ulimit Args - Ulimit options to add.
- Uploads
Changes to this property will trigger replacement.
Upload Args - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - User
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - Userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- Volumes
Changes to this property will trigger replacement.
Volume Args - Spec for mounting volumes in the container.
- Wait bool
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - Wait
Timeout int - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - Working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- image
This property is required. Changes to this property will trigger replacement.
- 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. - attach Boolean
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - capabilities
Changes to this property will trigger replacement.
Capabilities - Add or drop certrain linux capabilities.
- cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container
Read IntegerRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu
Set String - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - Integer
- CPU shares (relative weight) for the container.
- destroy
Grace IntegerSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
Device> - Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck
Container
Healthcheck - A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
Host> - Additional hosts to add to the container.
- init Boolean
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
Label> - User-defined key/value metadata
- log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs Boolean
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max
Retry IntegerCount - The maximum amount of times to an attempt a restart when
restart
is set to 'on-failure'. - memory Integer
- The memory limit for the container in MBs.
- memory
Swap Integer - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
Mount> - Specification for mounts to be added to containers created as part of the service.
- must
Run Boolean - name
Changes to this property will trigger replacement.
- The name of the container.
- network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks
Advanced Changes to this property will trigger replacement.
Networks Advanced> - The networks the container is attached to
- pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
Port> - Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove
Volumes Boolean - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart String
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm Boolean
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start Boolean
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs Map<String,String>
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
Ulimit> - Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
Upload> - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
Volume> - Spec for mounting volumes in the container.
- wait
Timeout Integer - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - wait_ Boolean
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- image
This property is required. Changes to this property will trigger replacement.
- 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. - attach boolean
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - capabilities
Changes to this property will trigger replacement.
Capabilities - Add or drop certrain linux capabilities.
- cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container
Read numberRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu
Set string - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - number
- CPU shares (relative weight) for the container.
- destroy
Grace numberSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
Device[] - Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck
Container
Healthcheck - A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
Host[] - Additional hosts to add to the container.
- init boolean
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
Label[] - User-defined key/value metadata
- log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs boolean
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max
Retry numberCount - 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.
- memory
Swap number - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
Mount[] - Specification for mounts to be added to containers created as part of the service.
- must
Run boolean - name
Changes to this property will trigger replacement.
- The name of the container.
- network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks
Advanced Changes to this property will trigger replacement.
Networks Advanced[] - The networks the container is attached to
- pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
Port[] - Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove
Volumes boolean - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart string
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm boolean
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start boolean
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs {[key: string]: string}
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
Ulimit[] - Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
Upload[] - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
Volume[] - Spec for mounting volumes in the container.
- wait boolean
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - wait
Timeout number - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- image
This property is required. Changes to this property will trigger replacement.
- 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. - attach bool
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - capabilities
Changes to this property will trigger replacement.
Capabilities Args - Add or drop certrain linux capabilities.
- cgroupns_
mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container_
read_ intrefresh_ timeout_ milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu_
set str - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - int
- CPU shares (relative weight) for the container.
- destroy_
grace_ intseconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
Device Args] - Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns_
opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns_
searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group_
adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck
Container
Healthcheck Args - A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
Host Args] - Additional hosts to add to the container.
- init bool
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc_
mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
Label Args] - User-defined key/value metadata
- log_
driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log_
opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs bool
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max_
retry_ intcount - 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.
- memory_
swap int - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
Mount Args] - Specification for mounts to be added to containers created as part of the service.
- must_
run bool - name
Changes to this property will trigger replacement.
- The name of the container.
- network_
mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks_
advanced Changes to this property will trigger replacement.
Networks Advanced Args] - The networks the container is attached to
- pid_
mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
Port Args] - Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish_
all_ ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read_
only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove_
volumes bool - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart str
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm bool
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security_
opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm_
size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start bool
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin_
open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop_
signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop_
timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage_
opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs Mapping[str, str]
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
Ulimit Args] - Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
Upload Args] - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns_
mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
Volume Args] - Spec for mounting volumes in the container.
- wait bool
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - wait_
timeout int - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - working_
dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- image
This property is required. Changes to this property will trigger replacement.
- 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. - attach Boolean
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - capabilities
Changes to this property will trigger replacement.
- Add or drop certrain linux capabilities.
- cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container
Read NumberRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu
Set String - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - Number
- CPU shares (relative weight) for the container.
- destroy
Grace NumberSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
- Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck Property Map
- A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
- Additional hosts to add to the container.
- init Boolean
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
- User-defined key/value metadata
- log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs Boolean
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max
Retry NumberCount - 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.
- memory
Swap Number - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
- Specification for mounts to be added to containers created as part of the service.
- must
Run Boolean - name
Changes to this property will trigger replacement.
- The name of the container.
- network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks
Advanced Changes to this property will trigger replacement.
- The networks the container is attached to
- pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
- Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove
Volumes Boolean - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart String
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm Boolean
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start Boolean
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs Map<String>
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
- Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
- Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
- Spec for mounting volumes in the container.
- wait Boolean
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - wait
Timeout Number - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - working
Dir Changes to this property will trigger replacement.
- 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.
- Container
Logs string - The logs of the container if its execution is done (
attach
must be disabled). - Exit
Code int - The exit code of the container if its execution is done (
must_run
must be disabled). - Id string
- The provider-assigned unique ID for this managed resource.
- Network
Datas List<ContainerNetwork Data> - The data of the networks the container is connected to.
- Bridge string
- The network bridge of the container as read from its NetworkSettings.
- Container
Logs string - The logs of the container if its execution is done (
attach
must be disabled). - Exit
Code int - The exit code of the container if its execution is done (
must_run
must be disabled). - Id string
- The provider-assigned unique ID for this managed resource.
- Network
Datas []ContainerNetwork Data - The data of the networks the container is connected to.
- bridge String
- The network bridge of the container as read from its NetworkSettings.
- container
Logs String - The logs of the container if its execution is done (
attach
must be disabled). - exit
Code Integer - The exit code of the container if its execution is done (
must_run
must be disabled). - id String
- The provider-assigned unique ID for this managed resource.
- network
Datas List<ContainerNetwork Data> - The data of the networks the container is connected to.
- bridge string
- The network bridge of the container as read from its NetworkSettings.
- container
Logs string - The logs of the container if its execution is done (
attach
must be disabled). - exit
Code number - The exit code of the container if its execution is done (
must_run
must be disabled). - id string
- The provider-assigned unique ID for this managed resource.
- network
Datas ContainerNetwork Data[] - The data of the networks the container is connected to.
- 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 int - The exit code of the container if its execution is done (
must_run
must be disabled). - id str
- The provider-assigned unique ID for this managed resource.
- network_
datas Sequence[ContainerNetwork Data] - The data of the networks the container is connected to.
- bridge String
- The network bridge of the container as read from its NetworkSettings.
- container
Logs String - The logs of the container if its execution is done (
attach
must be disabled). - exit
Code Number - The exit code of the container if its execution is done (
must_run
must be disabled). - id String
- The provider-assigned unique ID for this managed resource.
- network
Datas List<Property Map> - The data of the networks the container is connected to.
Look up 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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
attach: Optional[bool] = None,
bridge: Optional[str] = None,
capabilities: Optional[ContainerCapabilitiesArgs] = None,
cgroupns_mode: Optional[str] = None,
command: Optional[Sequence[str]] = None,
container_logs: Optional[str] = None,
container_read_refresh_timeout_milliseconds: Optional[int] = None,
cpu_set: Optional[str] = None,
cpu_shares: Optional[int] = None,
destroy_grace_seconds: Optional[int] = None,
devices: Optional[Sequence[ContainerDeviceArgs]] = None,
dns: Optional[Sequence[str]] = None,
dns_opts: Optional[Sequence[str]] = None,
dns_searches: Optional[Sequence[str]] = None,
domainname: Optional[str] = None,
entrypoints: Optional[Sequence[str]] = None,
envs: Optional[Sequence[str]] = None,
exit_code: Optional[int] = None,
gpus: Optional[str] = None,
group_adds: Optional[Sequence[str]] = None,
healthcheck: Optional[ContainerHealthcheckArgs] = None,
hostname: Optional[str] = None,
hosts: Optional[Sequence[ContainerHostArgs]] = None,
image: Optional[str] = None,
init: Optional[bool] = None,
ipc_mode: Optional[str] = None,
labels: Optional[Sequence[ContainerLabelArgs]] = None,
log_driver: Optional[str] = None,
log_opts: Optional[Mapping[str, str]] = None,
logs: Optional[bool] = None,
max_retry_count: Optional[int] = None,
memory: Optional[int] = None,
memory_swap: Optional[int] = None,
mounts: Optional[Sequence[ContainerMountArgs]] = None,
must_run: Optional[bool] = None,
name: Optional[str] = None,
network_datas: Optional[Sequence[ContainerNetworkDataArgs]] = None,
network_mode: Optional[str] = None,
networks_advanced: Optional[Sequence[ContainerNetworksAdvancedArgs]] = None,
pid_mode: Optional[str] = None,
ports: Optional[Sequence[ContainerPortArgs]] = None,
privileged: Optional[bool] = None,
publish_all_ports: Optional[bool] = None,
read_only: Optional[bool] = None,
remove_volumes: Optional[bool] = None,
restart: Optional[str] = None,
rm: Optional[bool] = None,
runtime: Optional[str] = None,
security_opts: Optional[Sequence[str]] = None,
shm_size: Optional[int] = None,
start: Optional[bool] = None,
stdin_open: Optional[bool] = None,
stop_signal: Optional[str] = None,
stop_timeout: Optional[int] = None,
storage_opts: Optional[Mapping[str, str]] = None,
sysctls: Optional[Mapping[str, str]] = None,
tmpfs: Optional[Mapping[str, str]] = None,
tty: Optional[bool] = None,
ulimits: Optional[Sequence[ContainerUlimitArgs]] = None,
uploads: Optional[Sequence[ContainerUploadArgs]] = None,
user: Optional[str] = None,
userns_mode: Optional[str] = None,
volumes: Optional[Sequence[ContainerVolumeArgs]] = None,
wait: Optional[bool] = None,
wait_timeout: Optional[int] = None,
working_dir: Optional[str] = None) -> Container
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)
public static Container get(String name, Output<String> id, ContainerState state, CustomResourceOptions options)
resources: _: type: docker:Container get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Attach bool
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - Bridge string
- The network bridge of the container as read from its NetworkSettings.
- Capabilities
Changes to this property will trigger replacement.
Capabilities - Add or drop certrain linux capabilities.
- Cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - Command
Changes to this property will trigger replacement.
- 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.con"]
. - Container
Logs string - The logs of the container if its execution is done (
attach
must be disabled). - Container
Read intRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- Cpu
Set string - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - int
- CPU shares (relative weight) for the container.
- Destroy
Grace intSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - Devices
Changes to this property will trigger replacement.
Device> - Bind devices to the container.
- Dns
Changes to this property will trigger replacement.
- DNS servers to use.
- Dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - Dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- Domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- Entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - Envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- Exit
Code int - The exit code of the container if its execution is done (
must_run
must be disabled). - Gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - Group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- Healthcheck
Container
Healthcheck - A test to perform to check that the container is healthy
- Hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- Hosts
Changes to this property will trigger replacement.
Host> - Additional hosts to add to the container.
- Image
Changes to this property will trigger replacement.
- 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. - Init bool
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - Ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - Labels
Changes to this property will trigger replacement.
Label> - User-defined key/value metadata
- Log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- Log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- Logs bool
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - Max
Retry intCount - 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.
- Memory
Swap int - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - Mounts
Changes to this property will trigger replacement.
Mount> - Specification for mounts to be added to containers created as part of the service.
- Must
Run bool - Name
Changes to this property will trigger replacement.
- The name of the container.
- Network
Datas List<ContainerNetwork Data> - The data of the networks the container is connected to.
- Network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- Networks
Advanced Changes to this property will trigger replacement.
Networks Advanced> - The networks the container is attached to
- Pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - Ports
Changes to this property will trigger replacement.
Port> - Publish a container's port(s) to the host.
- Privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - Publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- Read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - Remove
Volumes bool - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - Restart string
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - Rm bool
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - Runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- Security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- Shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - Start bool
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - Stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - Stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - Stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- Storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- Sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- Tmpfs Dictionary<string, string>
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - Tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - Ulimits
Changes to this property will trigger replacement.
Ulimit> - Ulimit options to add.
- Uploads
Changes to this property will trigger replacement.
Upload> - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - User
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - Userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- Volumes
Changes to this property will trigger replacement.
Volume> - Spec for mounting volumes in the container.
- Wait bool
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - Wait
Timeout int - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - Working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- Attach bool
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - Bridge string
- The network bridge of the container as read from its NetworkSettings.
- Capabilities
Changes to this property will trigger replacement.
Capabilities Args - Add or drop certrain linux capabilities.
- Cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - Command
Changes to this property will trigger replacement.
- 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.con"]
. - Container
Logs string - The logs of the container if its execution is done (
attach
must be disabled). - Container
Read intRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- Cpu
Set string - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - int
- CPU shares (relative weight) for the container.
- Destroy
Grace intSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - Devices
Changes to this property will trigger replacement.
Device Args - Bind devices to the container.
- Dns
Changes to this property will trigger replacement.
- DNS servers to use.
- Dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - Dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- Domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- Entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - Envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- Exit
Code int - The exit code of the container if its execution is done (
must_run
must be disabled). - Gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - Group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- Healthcheck
Container
Healthcheck Args - A test to perform to check that the container is healthy
- Hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- Hosts
Changes to this property will trigger replacement.
Host Args - Additional hosts to add to the container.
- Image
Changes to this property will trigger replacement.
- 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. - Init bool
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - Ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - Labels
Changes to this property will trigger replacement.
Label Args - User-defined key/value metadata
- Log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- Log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- Logs bool
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - Max
Retry intCount - 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.
- Memory
Swap int - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - Mounts
Changes to this property will trigger replacement.
Mount Args - Specification for mounts to be added to containers created as part of the service.
- Must
Run bool - Name
Changes to this property will trigger replacement.
- The name of the container.
- Network
Datas []ContainerNetwork Data Args - The data of the networks the container is connected to.
- Network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- Networks
Advanced Changes to this property will trigger replacement.
Networks Advanced Args - The networks the container is attached to
- Pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - Ports
Changes to this property will trigger replacement.
Port Args - Publish a container's port(s) to the host.
- Privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - Publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- Read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - Remove
Volumes bool - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - Restart string
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - Rm bool
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - Runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- Security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- Shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - Start bool
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - Stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - Stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - Stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- Storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- Sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- Tmpfs map[string]string
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - Tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - Ulimits
Changes to this property will trigger replacement.
Ulimit Args - Ulimit options to add.
- Uploads
Changes to this property will trigger replacement.
Upload Args - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - User
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - Userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- Volumes
Changes to this property will trigger replacement.
Volume Args - Spec for mounting volumes in the container.
- Wait bool
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - Wait
Timeout int - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - Working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- attach Boolean
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - bridge String
- The network bridge of the container as read from its NetworkSettings.
- capabilities
Changes to this property will trigger replacement.
Capabilities - Add or drop certrain linux capabilities.
- cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container
Logs String - The logs of the container if its execution is done (
attach
must be disabled). - container
Read IntegerRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu
Set String - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - Integer
- CPU shares (relative weight) for the container.
- destroy
Grace IntegerSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
Device> - Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- exit
Code Integer - The exit code of the container if its execution is done (
must_run
must be disabled). - gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck
Container
Healthcheck - A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
Host> - Additional hosts to add to the container.
- image
Changes to this property will trigger replacement.
- 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. - init Boolean
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
Label> - User-defined key/value metadata
- log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs Boolean
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max
Retry IntegerCount - The maximum amount of times to an attempt a restart when
restart
is set to 'on-failure'. - memory Integer
- The memory limit for the container in MBs.
- memory
Swap Integer - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
Mount> - Specification for mounts to be added to containers created as part of the service.
- must
Run Boolean - name
Changes to this property will trigger replacement.
- The name of the container.
- network
Datas List<ContainerNetwork Data> - The data of the networks the container is connected to.
- network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks
Advanced Changes to this property will trigger replacement.
Networks Advanced> - The networks the container is attached to
- pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
Port> - Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove
Volumes Boolean - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart String
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm Boolean
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start Boolean
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs Map<String,String>
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
Ulimit> - Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
Upload> - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
Volume> - Spec for mounting volumes in the container.
- wait
Timeout Integer - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - wait_ Boolean
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- attach boolean
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - bridge string
- The network bridge of the container as read from its NetworkSettings.
- capabilities
Changes to this property will trigger replacement.
Capabilities - Add or drop certrain linux capabilities.
- cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container
Logs string - The logs of the container if its execution is done (
attach
must be disabled). - container
Read numberRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu
Set string - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - number
- CPU shares (relative weight) for the container.
- destroy
Grace numberSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
Device[] - Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- exit
Code number - The exit code of the container if its execution is done (
must_run
must be disabled). - gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck
Container
Healthcheck - A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
Host[] - Additional hosts to add to the container.
- image
Changes to this property will trigger replacement.
- 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. - init boolean
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
Label[] - User-defined key/value metadata
- log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs boolean
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max
Retry numberCount - 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.
- memory
Swap number - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
Mount[] - Specification for mounts to be added to containers created as part of the service.
- must
Run boolean - name
Changes to this property will trigger replacement.
- The name of the container.
- network
Datas ContainerNetwork Data[] - The data of the networks the container is connected to.
- network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks
Advanced Changes to this property will trigger replacement.
Networks Advanced[] - The networks the container is attached to
- pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
Port[] - Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove
Volumes boolean - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart string
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm boolean
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start boolean
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs {[key: string]: string}
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
Ulimit[] - Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
Upload[] - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
Volume[] - Spec for mounting volumes in the container.
- wait boolean
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - wait
Timeout number - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- attach bool
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - bridge str
- The network bridge of the container as read from its NetworkSettings.
- capabilities
Changes to this property will trigger replacement.
Capabilities Args - Add or drop certrain linux capabilities.
- cgroupns_
mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container_
logs str - The logs of the container if its execution is done (
attach
must be disabled). - container_
read_ intrefresh_ timeout_ milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu_
set str - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - int
- CPU shares (relative weight) for the container.
- destroy_
grace_ intseconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
Device Args] - Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns_
opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns_
searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- exit_
code int - The exit code of the container if its execution is done (
must_run
must be disabled). - gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group_
adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck
Container
Healthcheck Args - A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
Host Args] - Additional hosts to add to the container.
- image
Changes to this property will trigger replacement.
- 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. - init bool
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc_
mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
Label Args] - User-defined key/value metadata
- log_
driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log_
opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs bool
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max_
retry_ intcount - 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.
- memory_
swap int - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
Mount Args] - Specification for mounts to be added to containers created as part of the service.
- must_
run bool - name
Changes to this property will trigger replacement.
- The name of the container.
- network_
datas Sequence[ContainerNetwork Data Args] - The data of the networks the container is connected to.
- network_
mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks_
advanced Changes to this property will trigger replacement.
Networks Advanced Args] - The networks the container is attached to
- pid_
mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
Port Args] - Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish_
all_ ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read_
only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove_
volumes bool - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart str
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm bool
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security_
opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm_
size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start bool
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin_
open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop_
signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop_
timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage_
opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs Mapping[str, str]
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
Ulimit Args] - Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
Upload Args] - Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns_
mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
Volume Args] - Spec for mounting volumes in the container.
- wait bool
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - wait_
timeout int - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - working_
dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
- attach Boolean
- If
true
attach to the container after its creation and waits the end of its execution. Defaults tofalse
. - bridge String
- The network bridge of the container as read from its NetworkSettings.
- capabilities
Changes to this property will trigger replacement.
- Add or drop certrain linux capabilities.
- cgroupns
Mode Changes to this property will trigger replacement.
- Cgroup namespace mode to use for the container. Possible values are:
private
,host
. - command
Changes to this property will trigger replacement.
- 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.con"]
. - container
Logs String - The logs of the container if its execution is done (
attach
must be disabled). - container
Read NumberRefresh Timeout Milliseconds - The total number of milliseconds to wait for the container to reach status 'running'
- cpu
Set String - A comma-separated list or hyphen-separated range of CPUs a container can use, e.g.
0-1
. - Number
- CPU shares (relative weight) for the container.
- destroy
Grace NumberSeconds - If defined will attempt to stop the container before destroying. Container will be destroyed after
n
seconds or on successful stop. - devices
Changes to this property will trigger replacement.
- Bind devices to the container.
- dns
Changes to this property will trigger replacement.
- DNS servers to use.
- dns
Opts Changes to this property will trigger replacement.
- DNS options used by the DNS provider(s), see
resolv.conf
documentation for valid list of options. - dns
Searches Changes to this property will trigger replacement.
- DNS search domains that are used when bare unqualified hostnames are used inside of the container.
- domainname
Changes to this property will trigger replacement.
- Domain name of the container.
- entrypoints
Changes to this property will trigger replacement.
- 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/myprogra"]
. - envs
Changes to this property will trigger replacement.
- Environment variables to set in the form of
KEY=VALUE
, e.g.DEBUG=0
- exit
Code Number - The exit code of the container if its execution is done (
must_run
must be disabled). - gpus
Changes to this property will trigger replacement.
- GPU devices to add to the container. Currently, only the value
all
is supported. Passing any other value will result in unexpected behavior. - group
Adds Changes to this property will trigger replacement.
- Additional groups for the container user
- healthcheck Property Map
- A test to perform to check that the container is healthy
- hostname
Changes to this property will trigger replacement.
- Hostname of the container.
- hosts
Changes to this property will trigger replacement.
- Additional hosts to add to the container.
- image
Changes to this property will trigger replacement.
- 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. - init Boolean
- Configured whether an init process should be injected for this container. If unset this will default to the
dockerd
defaults. - ipc
Mode Changes to this property will trigger replacement.
- IPC sharing mode for the container. Possible values are:
none
,private
,shareable
,container:<name|id>
orhost
. - labels
Changes to this property will trigger replacement.
- User-defined key/value metadata
- log
Driver Changes to this property will trigger replacement.
- The logging driver to use for the container.
- log
Opts Changes to this property will trigger replacement.
- Key/value pairs to use as options for the logging driver.
- logs Boolean
- Save the container logs (
attach
must be enabled). Defaults tofalse
. - max
Retry NumberCount - 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.
- memory
Swap Number - The total memory limit (memory + swap) for the container in MBs. This setting may compute to
-1
afterpulumi up
if the target host doesn't support memory swap, when that is the case docker will use a soft limitation. - mounts
Changes to this property will trigger replacement.
- Specification for mounts to be added to containers created as part of the service.
- must
Run Boolean - name
Changes to this property will trigger replacement.
- The name of the container.
- network
Datas List<Property Map> - The data of the networks the container is connected to.
- network
Mode Changes to this property will trigger replacement.
- Network mode of the container.
- networks
Advanced Changes to this property will trigger replacement.
- The networks the container is attached to
- pid
Mode Changes to this property will trigger replacement.
- he PID (Process) Namespace mode for the container. Either
container:<name|id>
orhost
. - ports
Changes to this property will trigger replacement.
- Publish a container's port(s) to the host.
- privileged
Changes to this property will trigger replacement.
- If
true
, the container runs in privileged mode. - publish
All Ports Changes to this property will trigger replacement.
- Publish all ports of the container.
- read
Only Changes to this property will trigger replacement.
- If
true
, the container will be started as readonly. Defaults tofalse
. - remove
Volumes Boolean - If
true
, it will remove anonymous volumes associated with the container. Defaults totrue
. - restart String
- The restart policy for the container. Must be one of 'no', 'on-failure', 'always', 'unless-stopped'. Defaults to
no
. - rm Boolean
- If
true
, then the container will be automatically removed when it exits. Defaults tofalse
. - runtime
Changes to this property will trigger replacement.
- Runtime to use for the container.
- security
Opts Changes to this property will trigger replacement.
- List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
- shm
Size Changes to this property will trigger replacement.
- Size of
/dev/shm
in MBs. - start Boolean
- If
true
, then the Docker container will be started after creation. Iffalse
, then the container is only created. Defaults totrue
. - stdin
Open Changes to this property will trigger replacement.
- If
true
, keep STDIN open even if not attached (docker run -i
). Defaults tofalse
. - stop
Signal Changes to this property will trigger replacement.
- Signal to stop a container (default
SIGTERM
). - stop
Timeout Changes to this property will trigger replacement.
- Timeout (in seconds) to stop a container.
- storage
Opts Changes to this property will trigger replacement.
- Key/value pairs for the storage driver options, e.g.
size
:120G
- sysctls
Changes to this property will trigger replacement.
- A map of kernel parameters (sysctls) to set in the container.
- tmpfs Map<String>
- A map of container directories which should be replaced by
tmpfs mounts
, and their corresponding mount options. - tty
Changes to this property will trigger replacement.
- If
true
, allocate a pseudo-tty (docker run -t
). Defaults tofalse
. - ulimits
Changes to this property will trigger replacement.
- Ulimit options to add.
- uploads
Changes to this property will trigger replacement.
- Specifies files to upload to the container before starting it. Only one of
content
orcontent_base64
can be set and at least one of them has to be set. - user
Changes to this property will trigger replacement.
- User used for run the first process. Format is
user
oruser:group
which user and group can be passed literraly or by name. - userns
Mode Changes to this property will trigger replacement.
- Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
- volumes
Changes to this property will trigger replacement.
- Spec for mounting volumes in the container.
- wait Boolean
- If
true
, then the Docker container is waited for being healthy state after creation. Iffalse
, then the container health state is not checked. Defaults tofalse
. - wait
Timeout Number - The timeout in seconds to wait the container to be healthy after creation. Defaults to
60
. - working
Dir Changes to this property will trigger replacement.
- The working directory for commands to run in.
Supporting Types
ContainerCapabilities, ContainerCapabilitiesArgs
ContainerDevice, ContainerDeviceArgs
- Host
Path This property is required. Changes to this property will trigger replacement.
- The path on the host where the device is located.
- Container
Path Changes to this property will trigger replacement.
- The path in the container where the device will be bound.
- Permissions
Changes to this property will trigger replacement.
- The cgroup permissions given to the container to access the device. Defaults to
rwm
.
- Host
Path This property is required. Changes to this property will trigger replacement.
- The path on the host where the device is located.
- Container
Path Changes to this property will trigger replacement.
- The path in the container where the device will be bound.
- Permissions
Changes to this property will trigger replacement.
- The cgroup permissions given to the container to access the device. Defaults to
rwm
.
- host
Path This property is required. Changes to this property will trigger replacement.
- The path on the host where the device is located.
- container
Path Changes to this property will trigger replacement.
- The path in the container where the device will be bound.
- permissions
Changes to this property will trigger replacement.
- The cgroup permissions given to the container to access the device. Defaults to
rwm
.
- host
Path This property is required. Changes to this property will trigger replacement.
- The path on the host where the device is located.
- container
Path Changes to this property will trigger replacement.
- The path in the container where the device will be bound.
- permissions
Changes to this property will trigger replacement.
- The cgroup permissions given to the container to access the device. Defaults to
rwm
.
- host_
path This property is required. Changes to this property will trigger replacement.
- The path on the host where the device is located.
- container_
path Changes to this property will trigger replacement.
- The path in the container where the device will be bound.
- permissions
Changes to this property will trigger replacement.
- The cgroup permissions given to the container to access the device. Defaults to
rwm
.
- host
Path This property is required. Changes to this property will trigger replacement.
- The path on the host where the device is located.
- container
Path Changes to this property will trigger replacement.
- The path in the container where the device will be bound.
- permissions
Changes to this property will trigger replacement.
- The cgroup permissions given to the container to access the device. Defaults to
rwm
.
ContainerHealthcheck, ContainerHealthcheckArgs
- Tests
This property is required. List<string> - Command to run to check health. For example, to run
curl -f localhost/health
set the command to be["CMD", "curl", "-f", "localhost/health"]
. - Interval string
- Time between running the check (ms|s|m|h). Defaults to
0s
. - Retries int
- Consecutive failures needed to report unhealthy. Defaults to
0
. - Start
Period string - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to
0s
. - Timeout string
- Maximum time to allow one check to run (ms|s|m|h). Defaults to
0s
.
- Tests
This property is required. []string - Command to run to check health. For example, to run
curl -f localhost/health
set the command to be["CMD", "curl", "-f", "localhost/health"]
. - Interval string
- Time between running the check (ms|s|m|h). Defaults to
0s
. - Retries int
- Consecutive failures needed to report unhealthy. Defaults to
0
. - Start
Period string - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to
0s
. - Timeout string
- Maximum time to allow one check to run (ms|s|m|h). Defaults to
0s
.
- tests
This property is required. List<String> - Command to run to check health. For example, to run
curl -f localhost/health
set the command to be["CMD", "curl", "-f", "localhost/health"]
. - interval String
- Time between running the check (ms|s|m|h). Defaults to
0s
. - retries Integer
- Consecutive failures needed to report unhealthy. Defaults to
0
. - start
Period String - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to
0s
. - timeout String
- Maximum time to allow one check to run (ms|s|m|h). Defaults to
0s
.
- tests
This property is required. string[] - Command to run to check health. For example, to run
curl -f localhost/health
set the command to be["CMD", "curl", "-f", "localhost/health"]
. - interval string
- Time between running the check (ms|s|m|h). Defaults to
0s
. - retries number
- Consecutive failures needed to report unhealthy. Defaults to
0
. - start
Period string - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to
0s
. - timeout string
- Maximum time to allow one check to run (ms|s|m|h). Defaults to
0s
.
- tests
This property is required. Sequence[str] - Command to run to check health. For example, to run
curl -f localhost/health
set the command to be["CMD", "curl", "-f", "localhost/health"]
. - interval str
- Time between running the check (ms|s|m|h). Defaults to
0s
. - retries int
- Consecutive failures needed to report unhealthy. Defaults to
0
. - start_
period str - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to
0s
. - timeout str
- Maximum time to allow one check to run (ms|s|m|h). Defaults to
0s
.
- tests
This property is required. List<String> - Command to run to check health. For example, to run
curl -f localhost/health
set the command to be["CMD", "curl", "-f", "localhost/health"]
. - interval String
- Time between running the check (ms|s|m|h). Defaults to
0s
. - retries Number
- Consecutive failures needed to report unhealthy. Defaults to
0
. - start
Period String - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to
0s
. - timeout String
- Maximum time to allow one check to run (ms|s|m|h). Defaults to
0s
.
ContainerHost, ContainerHostArgs
ContainerLabel, ContainerLabelArgs
ContainerMount, ContainerMountArgs
- Target
This property is required. string - Container path
- Type
This property is required. string - The mount type
- Bind
Options ContainerMount Bind Options - Optional configuration for the bind type.
- Read
Only bool - Whether the mount should be read-only.
- Source string
- Mount source (e.g. a volume name, a host path).
- Tmpfs
Options Changes to this property will trigger replacement.
Mount Tmpfs Options - Optional configuration for the tmpfs type.
- Volume
Options ContainerMount Volume Options - Optional configuration for the volume type.
- Target
This property is required. string - Container path
- Type
This property is required. string - The mount type
- Bind
Options ContainerMount Bind Options - Optional configuration for the bind type.
- Read
Only bool - Whether the mount should be read-only.
- Source string
- Mount source (e.g. a volume name, a host path).
- Tmpfs
Options Changes to this property will trigger replacement.
Mount Tmpfs Options - Optional configuration for the tmpfs type.
- Volume
Options ContainerMount Volume Options - Optional configuration for the volume type.
- target
This property is required. String - Container path
- type
This property is required. String - The mount type
- bind
Options ContainerMount Bind Options - Optional configuration for the bind type.
- read
Only Boolean - Whether the mount should be read-only.
- source String
- Mount source (e.g. a volume name, a host path).
- tmpfs
Options Changes to this property will trigger replacement.
Mount Tmpfs Options - Optional configuration for the tmpfs type.
- volume
Options ContainerMount Volume Options - Optional configuration for the volume type.
- target
This property is required. string - Container path
- type
This property is required. string - The mount type
- bind
Options ContainerMount Bind Options - Optional configuration for the bind type.
- read
Only boolean - Whether the mount should be read-only.
- source string
- Mount source (e.g. a volume name, a host path).
- tmpfs
Options Changes to this property will trigger replacement.
Mount Tmpfs Options - Optional configuration for the tmpfs type.
- volume
Options ContainerMount Volume Options - Optional configuration for the volume type.
- target
This property is required. str - Container path
- type
This property is required. str - The mount type
- bind_
options ContainerMount Bind Options - Optional configuration for the bind type.
- read_
only bool - Whether the mount should be read-only.
- source str
- Mount source (e.g. a volume name, a host path).
- tmpfs_
options Changes to this property will trigger replacement.
Mount Tmpfs Options - Optional configuration for the tmpfs type.
- volume_
options ContainerMount Volume Options - Optional configuration for the volume type.
- target
This property is required. String - Container path
- type
This property is required. String - The mount type
- bind
Options Property Map - Optional configuration for the bind type.
- read
Only Boolean - Whether the mount should be read-only.
- source String
- Mount source (e.g. a volume name, a host path).
- tmpfs
Options Changes to this property will trigger replacement.
- Optional configuration for the tmpfs type.
- volume
Options Property Map - Optional configuration for the volume type.
ContainerMountBindOptions, ContainerMountBindOptionsArgs
- 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 string
- A propagation mode with the value.
- propagation str
- A propagation mode with the value.
- propagation String
- A propagation mode with the value.
ContainerMountTmpfsOptions, ContainerMountTmpfsOptionsArgs
- mode int
- The permission mode for the tmpfs mount in an integer.
- size_
bytes int - The size for the tmpfs mount in bytes.
ContainerMountVolumeOptions, ContainerMountVolumeOptionsArgs
- Driver
Name string - Name of the driver to use to create the volume.
- Driver
Options Dictionary<string, string> - key/value map of driver specific options.
- Labels
List<Container
Mount Volume Options Label> - User-defined key/value metadata.
- No
Copy bool - Populate volume with data from the target.
- Driver
Name string - Name of the driver to use to create the volume.
- Driver
Options map[string]string - key/value map of driver specific options.
- Labels
[]Container
Mount Volume Options Label - User-defined key/value metadata.
- No
Copy bool - Populate volume with data from the target.
- driver
Name String - Name of the driver to use to create the volume.
- driver
Options Map<String,String> - key/value map of driver specific options.
- labels
List<Container
Mount Volume Options Label> - User-defined key/value metadata.
- no
Copy Boolean - Populate volume with data from the target.
- driver
Name string - Name of the driver to use to create the volume.
- driver
Options {[key: string]: string} - key/value map of driver specific options.
- labels
Container
Mount Volume Options Label[] - User-defined key/value metadata.
- no
Copy boolean - Populate volume with data from the target.
- driver_
name str - Name of the driver to use to create the volume.
- driver_
options Mapping[str, str] - key/value map of driver specific options.
- labels
Sequence[Container
Mount Volume Options Label] - User-defined key/value metadata.
- no_
copy bool - Populate volume with data from the target.
- driver
Name String - Name of the driver to use to create the volume.
- driver
Options Map<String> - key/value map of driver specific options.
- labels List<Property Map>
- User-defined key/value metadata.
- no
Copy Boolean - Populate volume with data from the target.
ContainerMountVolumeOptionsLabel, ContainerMountVolumeOptionsLabelArgs
ContainerNetworkData, ContainerNetworkDataArgs
- Gateway string
- The network gateway of the container.
- Global
Ipv6Address string - The IPV6 address of the container.
- Global
Ipv6Prefix intLength - The IPV6 prefix length address of the container.
- Ip
Address string - The IP address of the container.
- Ip
Prefix intLength - The IP prefix length of the container.
- Ipv6Gateway string
- The IPV6 gateway of the container.
- Mac
Address string - The MAC address of the container.
- Network
Name string - The name of the network
- Gateway string
- The network gateway of the container.
- Global
Ipv6Address string - The IPV6 address of the container.
- Global
Ipv6Prefix intLength - The IPV6 prefix length address of the container.
- Ip
Address string - The IP address of the container.
- Ip
Prefix intLength - The IP prefix length of the container.
- Ipv6Gateway string
- The IPV6 gateway of the container.
- Mac
Address string - The MAC address of the container.
- Network
Name string - The name of the network
- gateway String
- The network gateway of the container.
- global
Ipv6Address String - The IPV6 address of the container.
- global
Ipv6Prefix IntegerLength - The IPV6 prefix length address of the container.
- ip
Address String - The IP address of the container.
- ip
Prefix IntegerLength - The IP prefix length of the container.
- ipv6Gateway String
- The IPV6 gateway of the container.
- mac
Address String - The MAC address of the container.
- network
Name String - The name of the network
- gateway string
- The network gateway of the container.
- global
Ipv6Address string - The IPV6 address of the container.
- global
Ipv6Prefix numberLength - The IPV6 prefix length address of the container.
- ip
Address string - The IP address of the container.
- ip
Prefix numberLength - The IP prefix length of the container.
- ipv6Gateway string
- The IPV6 gateway of the container.
- mac
Address string - The MAC address of the container.
- network
Name string - The name of the network
- gateway str
- The network gateway of the container.
- global_
ipv6_ straddress - The IPV6 address of the container.
- global_
ipv6_ intprefix_ length - The IPV6 prefix length address of the container.
- ip_
address str - The IP address of the container.
- ip_
prefix_ intlength - The IP prefix length of the container.
- ipv6_
gateway str - The IPV6 gateway of the container.
- mac_
address str - The MAC address of the container.
- network_
name str - The name of the network
- gateway String
- The network gateway of the container.
- global
Ipv6Address String - The IPV6 address of the container.
- global
Ipv6Prefix NumberLength - The IPV6 prefix length address of the container.
- ip
Address String - The IP address of the container.
- ip
Prefix NumberLength - The IP prefix length of the container.
- ipv6Gateway String
- The IPV6 gateway of the container.
- mac
Address String - The MAC address of the container.
- network
Name String - The name of the network
ContainerNetworksAdvanced, ContainerNetworksAdvancedArgs
- Name
This property is required. Changes to this property will trigger replacement.
- The name or id of the network to use. You can use
name
orid
attribute from adocker.Network
resource. - Aliases
Changes to this property will trigger replacement.
- The network aliases of the container in the specific network.
- Ipv4Address
Changes to this property will trigger replacement.
- The IPV4 address of the container in the specific network.
- Ipv6Address
Changes to this property will trigger replacement.
- The IPV6 address of the container in the specific network.
- Name
This property is required. Changes to this property will trigger replacement.
- The name or id of the network to use. You can use
name
orid
attribute from adocker.Network
resource. - Aliases
Changes to this property will trigger replacement.
- The network aliases of the container in the specific network.
- Ipv4Address
Changes to this property will trigger replacement.
- The IPV4 address of the container in the specific network.
- Ipv6Address
Changes to this property will trigger replacement.
- The IPV6 address of the container in the specific network.
- name
This property is required. Changes to this property will trigger replacement.
- The name or id of the network to use. You can use
name
orid
attribute from adocker.Network
resource. - aliases
Changes to this property will trigger replacement.
- The network aliases of the container in the specific network.
- ipv4Address
Changes to this property will trigger replacement.
- The IPV4 address of the container in the specific network.
- ipv6Address
Changes to this property will trigger replacement.
- The IPV6 address of the container in the specific network.
- name
This property is required. Changes to this property will trigger replacement.
- The name or id of the network to use. You can use
name
orid
attribute from adocker.Network
resource. - aliases
Changes to this property will trigger replacement.
- The network aliases of the container in the specific network.
- ipv4Address
Changes to this property will trigger replacement.
- The IPV4 address of the container in the specific network.
- ipv6Address
Changes to this property will trigger replacement.
- The IPV6 address of the container in the specific network.
- name
This property is required. Changes to this property will trigger replacement.
- The name or id of the network to use. You can use
name
orid
attribute from adocker.Network
resource. - aliases
Changes to this property will trigger replacement.
- The network aliases of the container in the specific network.
- ipv4_
address Changes to this property will trigger replacement.
- The IPV4 address of the container in the specific network.
- ipv6_
address Changes to this property will trigger replacement.
- The IPV6 address of the container in the specific network.
- name
This property is required. Changes to this property will trigger replacement.
- The name or id of the network to use. You can use
name
orid
attribute from adocker.Network
resource. - aliases
Changes to this property will trigger replacement.
- The network aliases of the container in the specific network.
- ipv4Address
Changes to this property will trigger replacement.
- The IPV4 address of the container in the specific network.
- ipv6Address
Changes to this property will trigger replacement.
- The IPV6 address of the container in the specific network.
ContainerPort, ContainerPortArgs
- Internal
This property is required. Changes to this property will trigger replacement.
- Port within the container.
- External
Changes to this property will trigger replacement.
- Port exposed out of the container. If not given a free random port
>= 32768
will be used. - Ip
Changes to this property will trigger replacement.
- IP address/mask that can access this port. Defaults to
0.0.0.0
. - Protocol
Changes to this property will trigger replacement.
- Protocol that can be used over this port. Defaults to
tcp
.
- Internal
This property is required. Changes to this property will trigger replacement.
- Port within the container.
- External
Changes to this property will trigger replacement.
- Port exposed out of the container. If not given a free random port
>= 32768
will be used. - Ip
Changes to this property will trigger replacement.
- IP address/mask that can access this port. Defaults to
0.0.0.0
. - Protocol
Changes to this property will trigger replacement.
- Protocol that can be used over this port. Defaults to
tcp
.
- internal
This property is required. Changes to this property will trigger replacement.
- Port within the container.
- external
Changes to this property will trigger replacement.
- Port exposed out of the container. If not given a free random port
>= 32768
will be used. - ip
Changes to this property will trigger replacement.
- IP address/mask that can access this port. Defaults to
0.0.0.0
. - protocol
Changes to this property will trigger replacement.
- Protocol that can be used over this port. Defaults to
tcp
.
- internal
This property is required. Changes to this property will trigger replacement.
- Port within the container.
- external
Changes to this property will trigger replacement.
- Port exposed out of the container. If not given a free random port
>= 32768
will be used. - ip
Changes to this property will trigger replacement.
- IP address/mask that can access this port. Defaults to
0.0.0.0
. - protocol
Changes to this property will trigger replacement.
- Protocol that can be used over this port. Defaults to
tcp
.
- internal
This property is required. Changes to this property will trigger replacement.
- Port within the container.
- external
Changes to this property will trigger replacement.
- Port exposed out of the container. If not given a free random port
>= 32768
will be used. - ip
Changes to this property will trigger replacement.
- IP address/mask that can access this port. Defaults to
0.0.0.0
. - protocol
Changes to this property will trigger replacement.
- Protocol that can be used over this port. Defaults to
tcp
.
- internal
This property is required. Changes to this property will trigger replacement.
- Port within the container.
- external
Changes to this property will trigger replacement.
- Port exposed out of the container. If not given a free random port
>= 32768
will be used. - ip
Changes to this property will trigger replacement.
- IP address/mask that can access this port. Defaults to
0.0.0.0
. - protocol
Changes to this property will trigger replacement.
- Protocol that can be used over this port. Defaults to
tcp
.
ContainerUlimit, ContainerUlimitArgs
- Hard
This property is required. Changes to this property will trigger replacement.
- The hard limit
- Name
This property is required. Changes to this property will trigger replacement.
- The name of the ulimit
- Soft
This property is required. Changes to this property will trigger replacement.
- The soft limit
- Hard
This property is required. Changes to this property will trigger replacement.
- The hard limit
- Name
This property is required. Changes to this property will trigger replacement.
- The name of the ulimit
- Soft
This property is required. Changes to this property will trigger replacement.
- The soft limit
- hard
This property is required. Changes to this property will trigger replacement.
- The hard limit
- name
This property is required. Changes to this property will trigger replacement.
- The name of the ulimit
- soft
This property is required. Changes to this property will trigger replacement.
- The soft limit
- hard
This property is required. Changes to this property will trigger replacement.
- The hard limit
- name
This property is required. Changes to this property will trigger replacement.
- The name of the ulimit
- soft
This property is required. Changes to this property will trigger replacement.
- The soft limit
- hard
This property is required. Changes to this property will trigger replacement.
- The hard limit
- name
This property is required. Changes to this property will trigger replacement.
- The name of the ulimit
- soft
This property is required. Changes to this property will trigger replacement.
- The soft limit
- hard
This property is required. Changes to this property will trigger replacement.
- The hard limit
- name
This property is required. Changes to this property will trigger replacement.
- The name of the ulimit
- soft
This property is required. Changes to this property will trigger replacement.
- The soft limit
ContainerUpload, ContainerUploadArgs
- File
This property is required. Changes to this property will trigger replacement.
- Path to the file in the container where is upload goes to
- Content
Changes to this property will trigger replacement.
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with
content_base64
&source
- Content
Base64 Changes to this property will trigger replacement.
- Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the
base64encode
interpolation function. See here for the reason. Conflicts withcontent
&source
- Executable
Changes to this property will trigger replacement.
- If
true
, the file will be uploaded with user executable permission. Defaults tofalse
. - Source
Changes to this property will trigger replacement.
- 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. Conflicts with
content
&content_base64
- Source
Hash Changes to this property will trigger replacement.
- If using
source
, this will force an update if the file content has updated but the filename has not.
- File
This property is required. Changes to this property will trigger replacement.
- Path to the file in the container where is upload goes to
- Content
Changes to this property will trigger replacement.
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with
content_base64
&source
- Content
Base64 Changes to this property will trigger replacement.
- Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the
base64encode
interpolation function. See here for the reason. Conflicts withcontent
&source
- Executable
Changes to this property will trigger replacement.
- If
true
, the file will be uploaded with user executable permission. Defaults tofalse
. - Source
Changes to this property will trigger replacement.
- 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. Conflicts with
content
&content_base64
- Source
Hash Changes to this property will trigger replacement.
- If using
source
, this will force an update if the file content has updated but the filename has not.
- file
This property is required. Changes to this property will trigger replacement.
- Path to the file in the container where is upload goes to
- content
Changes to this property will trigger replacement.
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with
content_base64
&source
- content
Base64 Changes to this property will trigger replacement.
- Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the
base64encode
interpolation function. See here for the reason. Conflicts withcontent
&source
- executable
Changes to this property will trigger replacement.
- If
true
, the file will be uploaded with user executable permission. Defaults tofalse
. - source
Changes to this property will trigger replacement.
- 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. Conflicts with
content
&content_base64
- source
Hash Changes to this property will trigger replacement.
- If using
source
, this will force an update if the file content has updated but the filename has not.
- file
This property is required. Changes to this property will trigger replacement.
- Path to the file in the container where is upload goes to
- content
Changes to this property will trigger replacement.
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with
content_base64
&source
- content
Base64 Changes to this property will trigger replacement.
- Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the
base64encode
interpolation function. See here for the reason. Conflicts withcontent
&source
- executable
Changes to this property will trigger replacement.
- If
true
, the file will be uploaded with user executable permission. Defaults tofalse
. - source
Changes to this property will trigger replacement.
- 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. Conflicts with
content
&content_base64
- source
Hash Changes to this property will trigger replacement.
- If using
source
, this will force an update if the file content has updated but the filename has not.
- file
This property is required. Changes to this property will trigger replacement.
- Path to the file in the container where is upload goes to
- content
Changes to this property will trigger replacement.
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with
content_base64
&source
- content_
base64 Changes to this property will trigger replacement.
- Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the
base64encode
interpolation function. See here for the reason. Conflicts withcontent
&source
- executable
Changes to this property will trigger replacement.
- If
true
, the file will be uploaded with user executable permission. Defaults tofalse
. - source
Changes to this property will trigger replacement.
- 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. Conflicts with
content
&content_base64
- source_
hash Changes to this property will trigger replacement.
- If using
source
, this will force an update if the file content has updated but the filename has not.
- file
This property is required. Changes to this property will trigger replacement.
- Path to the file in the container where is upload goes to
- content
Changes to this property will trigger replacement.
- Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with
content_base64
&source
- content
Base64 Changes to this property will trigger replacement.
- Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the
base64encode
interpolation function. See here for the reason. Conflicts withcontent
&source
- executable
Changes to this property will trigger replacement.
- If
true
, the file will be uploaded with user executable permission. Defaults tofalse
. - source
Changes to this property will trigger replacement.
- 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. Conflicts with
content
&content_base64
- source
Hash Changes to this property will trigger replacement.
- If using
source
, this will force an update if the file content has updated but the filename has not.
ContainerVolume, ContainerVolumeArgs
- Container
Path Changes to this property will trigger replacement.
- The path in the container where the volume will be mounted.
- From
Container Changes to this property will trigger replacement.
- The container where the volume is coming from.
- Host
Path Changes to this property will trigger replacement.
- The path on the host where the volume is coming from.
- Read
Only Changes to this property will trigger replacement.
- If
true
, this volume will be readonly. Defaults tofalse
. - Volume
Name Changes to this property will trigger replacement.
- The name of the docker volume which should be mounted.
- Container
Path Changes to this property will trigger replacement.
- The path in the container where the volume will be mounted.
- From
Container Changes to this property will trigger replacement.
- The container where the volume is coming from.
- Host
Path Changes to this property will trigger replacement.
- The path on the host where the volume is coming from.
- Read
Only Changes to this property will trigger replacement.
- If
true
, this volume will be readonly. Defaults tofalse
. - Volume
Name Changes to this property will trigger replacement.
- The name of the docker volume which should be mounted.
- container
Path Changes to this property will trigger replacement.
- The path in the container where the volume will be mounted.
- from
Container Changes to this property will trigger replacement.
- The container where the volume is coming from.
- host
Path Changes to this property will trigger replacement.
- The path on the host where the volume is coming from.
- read
Only Changes to this property will trigger replacement.
- If
true
, this volume will be readonly. Defaults tofalse
. - volume
Name Changes to this property will trigger replacement.
- The name of the docker volume which should be mounted.
- container
Path Changes to this property will trigger replacement.
- The path in the container where the volume will be mounted.
- from
Container Changes to this property will trigger replacement.
- The container where the volume is coming from.
- host
Path Changes to this property will trigger replacement.
- The path on the host where the volume is coming from.
- read
Only Changes to this property will trigger replacement.
- If
true
, this volume will be readonly. Defaults tofalse
. - volume
Name Changes to this property will trigger replacement.
- The name of the docker volume which should be mounted.
- container_
path Changes to this property will trigger replacement.
- The path in the container where the volume will be mounted.
- from_
container Changes to this property will trigger replacement.
- The container where the volume is coming from.
- host_
path Changes to this property will trigger replacement.
- The path on the host where the volume is coming from.
- read_
only Changes to this property will trigger replacement.
- If
true
, this volume will be readonly. Defaults tofalse
. - volume_
name Changes to this property will trigger replacement.
- The name of the docker volume which should be mounted.
- container
Path Changes to this property will trigger replacement.
- The path in the container where the volume will be mounted.
- from
Container Changes to this property will trigger replacement.
- The container where the volume is coming from.
- host
Path Changes to this property will trigger replacement.
- The path on the host where the volume is coming from.
- read
Only Changes to this property will trigger replacement.
- If
true
, this volume will be readonly. Defaults tofalse
. - volume
Name Changes to this property will trigger replacement.
- The name of the docker volume which should be mounted.
Import
Example
Assuming you created a container
as follows
#!/bin/bash
docker run –name foo -p8080:80 -d nginx
prints the container ID
9a550c0f0163d39d77222d3efd58701b625d47676c25c686c95b5b92d1cba6fd
you provide the definition for the resource as follows
terraform
resource “docker_container” “foo” {
name = “foo”
image = “nginx”
ports {
internal = "80"
external = "8080"
}
}
then the import command is as follows
#!/bin/bash
$ pulumi import docker:index/container:Container foo 9a550c0f0163d39d77222d3efd58701b625d47676c25c686c95b5b92d1cba6fd
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Docker pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
docker
Terraform Provider.