Pulumi Docker

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-docker repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-docker repo.

class pulumi_docker.AwaitableGetNetworkResult(driver=None, id=None, internal=None, ipam_configs=None, name=None, options=None, scope=None)
class pulumi_docker.AwaitableGetRegistryImageResult(name=None, sha256_digest=None, id=None)
class pulumi_docker.Container(resource_name, opts=None, attach=None, capabilities=None, command=None, cpu_set=None, cpu_shares=None, destroy_grace_seconds=None, devices=None, dns=None, dns_opts=None, dns_searches=None, domainname=None, entrypoints=None, envs=None, group_adds=None, healthcheck=None, hosts=None, hostname=None, image=None, ipc_mode=None, labels=None, links=None, log_driver=None, log_opts=None, logs=None, max_retry_count=None, memory=None, memory_swap=None, mounts=None, must_run=None, name=None, network_aliases=None, network_mode=None, networks=None, networks_advanced=None, pid_mode=None, ports=None, privileged=None, publish_all_ports=None, read_only=None, restart=None, rm=None, shm_size=None, start=None, sysctls=None, tmpfs=None, ulimits=None, uploads=None, user=None, userns_mode=None, volumes=None, working_dir=None, __props__=None, __name__=None, __opts__=None)

Manages the lifecycle of a Docker container.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attach (pulumi.Input[bool]) – If true attach to the container after its creation and waits the end of his execution.

  • capabilities (pulumi.Input[dict]) – See Capabilities below for details.

  • command (pulumi.Input[list]) – The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

  • cpu_set (pulumi.Input[str]) – A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

  • cpu_shares (pulumi.Input[float]) – CPU shares (relative weight) for the container.

  • destroy_grace_seconds (pulumi.Input[float]) – If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

  • devices (pulumi.Input[list]) – See Devices below for details.

  • dns (pulumi.Input[list]) – Set of DNS servers.

  • dns_opts (pulumi.Input[list]) – Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

  • dns_searches (pulumi.Input[list]) – Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

  • domainname (pulumi.Input[str]) – Domain name of the container.

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

  • envs (pulumi.Input[list]) – Environment variables to set.

  • group_adds (pulumi.Input[list]) – Add additional groups to run as.

  • healthcheck (pulumi.Input[dict]) – See Healthcheck below for details.

  • hosts (pulumi.Input[list]) – Hostname to add.

  • hostname (pulumi.Input[str]) – Hostname of the container.

  • image (pulumi.Input[str]) – The ID of the image to back this container. The easiest way to get this value is to use the .RemoteImage resource as is shown in the example above.

  • ipc_mode (pulumi.Input[str]) – IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

  • labels (pulumi.Input[dict]) – Adding labels.

  • links (pulumi.Input[list]) – Set of links for link based connectivity between containers that are running on the same host.

  • log_driver (pulumi.Input[str]) – The logging driver to use for the container. Defaults to “json-file”.

  • log_opts (pulumi.Input[dict]) – Key/value pairs to use as options for the logging driver.

  • logs (pulumi.Input[bool]) – Save the container logs (attach must be enabled).

  • max_retry_count (pulumi.Input[float]) – The maximum amount of times to an attempt a restart when restart is set to “on-failure”

* `working_dir`- (Optional, string) The working directory for commands to run in
Parameters
  • memory (pulumi.Input[float]) – The memory limit for the container in MBs.

  • mounts (pulumi.Input[list]) – See Mounts below for details.

  • network_aliases (pulumi.Input[list]) – Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

  • network_mode (pulumi.Input[str]) – Network mode of the container.

  • networks (pulumi.Input[list]) – Id of the networks in which the container is. Deprecated: use networks_advanced instead.

  • networks_advanced (pulumi.Input[list]) – See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

  • pid_mode (pulumi.Input[str]) – The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

  • ports (pulumi.Input[list]) – See Ports below for details.

  • privileged (pulumi.Input[bool]) – Run container in privileged mode.

  • publish_all_ports (pulumi.Input[bool]) – Publish all ports of the container.

  • read_only (pulumi.Input[bool]) – If true, this volume will be readonly. Defaults to false.

  • restart (pulumi.Input[str]) – The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

  • shm_size (pulumi.Input[float]) – Size of /dev/shm in MBs.

  • start (pulumi.Input[bool]) – If true, then the Docker container will be started after creation. If false, then the container is only created.

  • sysctls (pulumi.Input[dict]) – A map of kernel parameters (sysctls) to set in the container.

  • tmpfs (pulumi.Input[dict]) – A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

  • ulimits (pulumi.Input[list]) – See Ulimits below for details.

  • uploads (pulumi.Input[list]) – See File Upload below for details.

  • user (pulumi.Input[str]) – User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

  • userns_mode (pulumi.Input[str]) – Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

  • volumes (pulumi.Input[list]) – See Volumes below for details.

The capabilities object supports the following:

  • adds (pulumi.Input[list]) - list of linux capabilities to add.

  • drops (pulumi.Input[list]) - list of linux capabilities to drop.

The devices object supports the following:

  • containerPath (pulumi.Input[str]) - The path in the container where the device will be binded.

  • hostPath (pulumi.Input[str]) - The path on the host where the device is located.

  • permissions (pulumi.Input[str]) - The cgroup permissions given to the container to access the device. Defaults to rwm.

The healthcheck object supports the following:

  • interval (pulumi.Input[str])

  • retries (pulumi.Input[float])

  • startPeriod (pulumi.Input[str])

  • tests (pulumi.Input[list])

  • timeout (pulumi.Input[str])

The hosts object supports the following:

  • host (pulumi.Input[str]) - Hostname to add.

  • ip (pulumi.Input[str]) - IP address this hostname should resolve to.

The mounts object supports the following:

  • bindOptions (pulumi.Input[dict]) - Optional configuration for the bind type.

    • propagation (pulumi.Input[str]) - A propagation mode with the value.

  • read_only (pulumi.Input[bool]) - If true, this volume will be readonly. Defaults to false.

  • source (pulumi.Input[str]) - The mount source (e.g., a volume name, a host path)

  • target (pulumi.Input[str]) - The container path.

  • tmpfsOptions (pulumi.Input[dict]) - Optional configuration for the tmpf type.

    • mode (pulumi.Input[float]) - The permission mode for the tmpfs mount in an integer.

    • sizeBytes (pulumi.Input[float]) - The size for the tmpfs mount in bytes.

  • type (pulumi.Input[str]) - The mount type: valid values are bind|volume|tmpfs.

  • volumeOptions (pulumi.Input[dict]) - Optional configuration for the volume type.

    • driverName (pulumi.Input[str])

    • driverOptions (pulumi.Input[dict]) - Options for the driver.

    • labels (pulumi.Input[dict]) - Adding labels.

    • noCopy (pulumi.Input[bool]) - Whether to populate volume with data from the target.

The networks_advanced object supports the following:

  • aliases (pulumi.Input[list]) - The network aliases of the container in the specific network.

  • ipv4Address (pulumi.Input[str]) - The IPV4 address of the container in the specific network.

  • ipv6Address (pulumi.Input[str]) - The IPV6 address of the container in the specific network.

  • name (pulumi.Input[str])

The ports object supports the following:

  • external (pulumi.Input[float]) - Port exposed out of the container. If not given a free random port >= 32768 will be used.

  • internal (pulumi.Input[float]) - Port within the container.

  • ip (pulumi.Input[str]) - IP address this hostname should resolve to.

  • protocol (pulumi.Input[str]) - Protocol that can be used over this port, defaults to tcp.

The ulimits object supports the following:

  • hard (pulumi.Input[float])

  • name (pulumi.Input[str])

  • soft (pulumi.Input[float])

The uploads object supports the following:

  • content (pulumi.Input[str]) - Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

  • contentBase64 (pulumi.Input[str]) -

  • executable (pulumi.Input[bool]) - If true, the file will be uploaded with user executable permission. Defaults to false.

  • file (pulumi.Input[str]) - path to a file in the container.

The volumes object supports the following:

  • containerPath (pulumi.Input[str]) - The path in the container where the device will be binded.

  • fromContainer (pulumi.Input[str]) - The container where the volume is coming from.

  • hostPath (pulumi.Input[str]) - The path on the host where the device is located.

  • read_only (pulumi.Input[bool]) - If true, this volume will be readonly. Defaults to false.

  • volumeName (pulumi.Input[str]) - The name of the docker volume which should be mounted.

attach = None

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

bridge = None

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

capabilities = None

See Capabilities below for details.

  • adds (list) - list of linux capabilities to add.

  • drops (list) - list of linux capabilities to drop.

command = None

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

container_logs = None

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

cpu_set = None

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

cpu_shares = None

CPU shares (relative weight) for the container.

destroy_grace_seconds = None

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

devices = None

See Devices below for details.

  • containerPath (str) - The path in the container where the device will be binded.

  • hostPath (str) - The path on the host where the device is located.

  • permissions (str) - The cgroup permissions given to the container to access the device. Defaults to rwm.

dns = None

Set of DNS servers.

dns_opts = None

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

dns_searches = None

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

domainname = None

Domain name of the container.

entrypoints = None

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

envs = None

Environment variables to set.

exit_code = None

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

gateway = None

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

group_adds = None

Add additional groups to run as.

healthcheck = None

See Healthcheck below for details.

  • interval (str)

  • retries (float)

  • startPeriod (str)

  • tests (list)

  • timeout (str)

hosts = None

Hostname to add.

  • host (str) - Hostname to add.

  • ip (str) - IP address this hostname should resolve to.

hostname = None

Hostname of the container.

image = None

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

ip_address = None

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

ip_prefix_length = None

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

ipc_mode = None

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

labels = None

Adding labels.

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

log_driver = None

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

log_opts = None

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

logs = None

Save the container logs (attach must be enabled).

max_retry_count = None

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

  • working_dir- (Optional, string) The working directory for commands to run in

memory = None

The memory limit for the container in MBs.

mounts = None

See Mounts below for details.

  • bindOptions (dict) - Optional configuration for the bind type.

    • propagation (str) - A propagation mode with the value.

  • read_only (bool) - If true, this volume will be readonly. Defaults to false.

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

  • target (str) - The container path.

  • tmpfsOptions (dict) - Optional configuration for the tmpf type.

    • mode (float) - The permission mode for the tmpfs mount in an integer.

    • sizeBytes (float) - The size for the tmpfs mount in bytes.

  • type (str) - The mount type: valid values are bind|volume|tmpfs.

  • volumeOptions (dict) - Optional configuration for the volume type.

    • driverName (str)

    • driverOptions (dict) - Options for the driver.

    • labels (dict) - Adding labels.

    • noCopy (bool) - Whether to populate volume with data from the target.

network_aliases = None

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

network_datas = None

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

  • gateway (str) - Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

  • ip_address (str) - Deprecated: Use network_data instead. The IP address of the container’s first network it.

  • ip_prefix_length (float) - Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

  • networkName (str)

network_mode = None

Network mode of the container.

networks = None

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

networks_advanced = None

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

  • aliases (list) - The network aliases of the container in the specific network.

  • ipv4Address (str) - The IPV4 address of the container in the specific network.

  • ipv6Address (str) - The IPV6 address of the container in the specific network.

  • name (str)

pid_mode = None

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

ports = None

See Ports below for details.

  • external (float) - Port exposed out of the container. If not given a free random port >= 32768 will be used.

  • internal (float) - Port within the container.

  • ip (str) - IP address this hostname should resolve to.

  • protocol (str) - Protocol that can be used over this port, defaults to tcp.

privileged = None

Run container in privileged mode.

publish_all_ports = None

Publish all ports of the container.

read_only = None

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

restart = None

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

shm_size = None

Size of /dev/shm in MBs.

start = None

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

sysctls = None

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

tmpfs = None

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

ulimits = None

See Ulimits below for details.

  • hard (float)

  • name (str)

  • soft (float)

uploads = None

See File Upload below for details.

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

  • contentBase64 (str) -

  • executable (bool) - If true, the file will be uploaded with user executable permission. Defaults to false.

  • file (str) - path to a file in the container.

user = None

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

userns_mode = None

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

volumes = None

See Volumes below for details.

  • containerPath (str) - The path in the container where the device will be binded.

  • fromContainer (str) - The container where the volume is coming from.

  • hostPath (str) - The path on the host where the device is located.

  • read_only (bool) - If true, this volume will be readonly. Defaults to false.

  • volumeName (str) - The name of the docker volume which should be mounted.

static get(resource_name, id, opts=None, attach=None, bridge=None, capabilities=None, command=None, container_logs=None, cpu_set=None, cpu_shares=None, destroy_grace_seconds=None, devices=None, dns=None, dns_opts=None, dns_searches=None, domainname=None, entrypoints=None, envs=None, exit_code=None, gateway=None, group_adds=None, healthcheck=None, hosts=None, hostname=None, image=None, ip_address=None, ip_prefix_length=None, ipc_mode=None, labels=None, links=None, log_driver=None, log_opts=None, logs=None, max_retry_count=None, memory=None, memory_swap=None, mounts=None, must_run=None, name=None, network_aliases=None, network_datas=None, network_mode=None, networks=None, networks_advanced=None, pid_mode=None, ports=None, privileged=None, publish_all_ports=None, read_only=None, restart=None, rm=None, shm_size=None, start=None, sysctls=None, tmpfs=None, ulimits=None, uploads=None, user=None, userns_mode=None, volumes=None, working_dir=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attach (pulumi.Input[bool]) – If true attach to the container after its creation and waits the end of his execution.

  • bridge (pulumi.Input[str]) – The network bridge of the container as read from its NetworkSettings.

  • capabilities (pulumi.Input[dict]) – See Capabilities below for details.

  • command (pulumi.Input[list]) – The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram", "-f", "baz.conf"].

  • container_logs (pulumi.Input[str]) – The logs of the container if its execution is done (attach must be disabled).

  • cpu_set (pulumi.Input[str]) – A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

  • cpu_shares (pulumi.Input[float]) – CPU shares (relative weight) for the container.

  • destroy_grace_seconds (pulumi.Input[float]) – If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

  • devices (pulumi.Input[list]) – See Devices below for details.

  • dns (pulumi.Input[list]) – Set of DNS servers.

  • dns_opts (pulumi.Input[list]) – Set of DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

  • dns_searches (pulumi.Input[list]) – Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.

  • domainname (pulumi.Input[str]) – Domain name of the container.

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

  • envs (pulumi.Input[list]) – Environment variables to set.

  • exit_code (pulumi.Input[float]) – The exit code of the container if its execution is done (must_run must be disabled).

  • gateway (pulumi.Input[str]) – Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

  • group_adds (pulumi.Input[list]) – Add additional groups to run as.

  • healthcheck (pulumi.Input[dict]) – See Healthcheck below for details.

  • hosts (pulumi.Input[list]) – Hostname to add.

  • hostname (pulumi.Input[str]) – Hostname of the container.

  • image (pulumi.Input[str]) – The ID of the image to back this container. The easiest way to get this value is to use the .RemoteImage resource as is shown in the example above.

  • ip_address (pulumi.Input[str]) – Deprecated: Use network_data instead. The IP address of the container’s first network it.

  • ip_prefix_length (pulumi.Input[float]) – Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

  • ipc_mode (pulumi.Input[str]) – IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

  • labels (pulumi.Input[dict]) – Adding labels.

  • links (pulumi.Input[list]) – Set of links for link based connectivity between containers that are running on the same host.

  • log_driver (pulumi.Input[str]) – The logging driver to use for the container. Defaults to “json-file”.

  • log_opts (pulumi.Input[dict]) – Key/value pairs to use as options for the logging driver.

  • logs (pulumi.Input[bool]) – Save the container logs (attach must be enabled).

  • max_retry_count (pulumi.Input[float]) – The maximum amount of times to an attempt a restart when restart is set to “on-failure”

* `working_dir`- (Optional, string) The working directory for commands to run in
Parameters
  • memory (pulumi.Input[float]) – The memory limit for the container in MBs.

  • mounts (pulumi.Input[list]) – See Mounts below for details.

  • network_aliases (pulumi.Input[list]) – Network aliases of the container for user-defined networks only. Deprecated: use networks_advanced instead.

  • network_datas (pulumi.Input[list]) – (Map of a block) The IP addresses of the container on each network. Key are the network names, values are the IP addresses.

  • network_mode (pulumi.Input[str]) – Network mode of the container.

  • networks (pulumi.Input[list]) – Id of the networks in which the container is. Deprecated: use networks_advanced instead.

  • networks_advanced (pulumi.Input[list]) – See Networks Advanced below for details. If this block has priority to the deprecated network_alias and network properties.

  • pid_mode (pulumi.Input[str]) – The PID (Process) Namespace mode for the container. Either container:<name|id> or host.

  • ports (pulumi.Input[list]) – See Ports below for details.

  • privileged (pulumi.Input[bool]) – Run container in privileged mode.

  • publish_all_ports (pulumi.Input[bool]) – Publish all ports of the container.

  • read_only (pulumi.Input[bool]) – If true, this volume will be readonly. Defaults to false.

  • restart (pulumi.Input[str]) – The restart policy for the container. Must be one of “no”, “on-failure”, “always”, “unless-stopped”.

  • shm_size (pulumi.Input[float]) – Size of /dev/shm in MBs.

  • start (pulumi.Input[bool]) – If true, then the Docker container will be started after creation. If false, then the container is only created.

  • sysctls (pulumi.Input[dict]) – A map of kernel parameters (sysctls) to set in the container.

  • tmpfs (pulumi.Input[dict]) – A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

  • ulimits (pulumi.Input[list]) – See Ulimits below for details.

  • uploads (pulumi.Input[list]) – See File Upload below for details.

  • user (pulumi.Input[str]) – User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

  • userns_mode (pulumi.Input[str]) – Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

  • volumes (pulumi.Input[list]) – See Volumes below for details.

The capabilities object supports the following:

  • adds (pulumi.Input[list]) - list of linux capabilities to add.

  • drops (pulumi.Input[list]) - list of linux capabilities to drop.

The devices object supports the following:

  • containerPath (pulumi.Input[str]) - The path in the container where the device will be binded.

  • hostPath (pulumi.Input[str]) - The path on the host where the device is located.

  • permissions (pulumi.Input[str]) - The cgroup permissions given to the container to access the device. Defaults to rwm.

The healthcheck object supports the following:

  • interval (pulumi.Input[str])

  • retries (pulumi.Input[float])

  • startPeriod (pulumi.Input[str])

  • tests (pulumi.Input[list])

  • timeout (pulumi.Input[str])

The hosts object supports the following:

  • host (pulumi.Input[str]) - Hostname to add.

  • ip (pulumi.Input[str]) - IP address this hostname should resolve to.

The mounts object supports the following:

  • bindOptions (pulumi.Input[dict]) - Optional configuration for the bind type.

    • propagation (pulumi.Input[str]) - A propagation mode with the value.

  • read_only (pulumi.Input[bool]) - If true, this volume will be readonly. Defaults to false.

  • source (pulumi.Input[str]) - The mount source (e.g., a volume name, a host path)

  • target (pulumi.Input[str]) - The container path.

  • tmpfsOptions (pulumi.Input[dict]) - Optional configuration for the tmpf type.

    • mode (pulumi.Input[float]) - The permission mode for the tmpfs mount in an integer.

    • sizeBytes (pulumi.Input[float]) - The size for the tmpfs mount in bytes.

  • type (pulumi.Input[str]) - The mount type: valid values are bind|volume|tmpfs.

  • volumeOptions (pulumi.Input[dict]) - Optional configuration for the volume type.

    • driverName (pulumi.Input[str])

    • driverOptions (pulumi.Input[dict]) - Options for the driver.

    • labels (pulumi.Input[dict]) - Adding labels.

    • noCopy (pulumi.Input[bool]) - Whether to populate volume with data from the target.

The network_datas object supports the following:

  • gateway (pulumi.Input[str]) - Deprecated: Use network_data instead. The network gateway of the container as read from its NetworkSettings.

  • ip_address (pulumi.Input[str]) - Deprecated: Use network_data instead. The IP address of the container’s first network it.

  • ip_prefix_length (pulumi.Input[float]) - Deprecated: Use network_data instead. The IP prefix length of the container as read from its NetworkSettings.

  • networkName (pulumi.Input[str])

The networks_advanced object supports the following:

  • aliases (pulumi.Input[list]) - The network aliases of the container in the specific network.

  • ipv4Address (pulumi.Input[str]) - The IPV4 address of the container in the specific network.

  • ipv6Address (pulumi.Input[str]) - The IPV6 address of the container in the specific network.

  • name (pulumi.Input[str])

The ports object supports the following:

  • external (pulumi.Input[float]) - Port exposed out of the container. If not given a free random port >= 32768 will be used.

  • internal (pulumi.Input[float]) - Port within the container.

  • ip (pulumi.Input[str]) - IP address this hostname should resolve to.

  • protocol (pulumi.Input[str]) - Protocol that can be used over this port, defaults to tcp.

The ulimits object supports the following:

  • hard (pulumi.Input[float])

  • name (pulumi.Input[str])

  • soft (pulumi.Input[float])

The uploads object supports the following:

  • content (pulumi.Input[str]) - Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

  • contentBase64 (pulumi.Input[str]) -

  • executable (pulumi.Input[bool]) - If true, the file will be uploaded with user executable permission. Defaults to false.

  • file (pulumi.Input[str]) - path to a file in the container.

The volumes object supports the following:

  • containerPath (pulumi.Input[str]) - The path in the container where the device will be binded.

  • fromContainer (pulumi.Input[str]) - The container where the volume is coming from.

  • hostPath (pulumi.Input[str]) - The path on the host where the device is located.

  • read_only (pulumi.Input[bool]) - If true, this volume will be readonly. Defaults to false.

  • volumeName (pulumi.Input[str]) - The name of the docker volume which should be mounted.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_docker.GetNetworkResult(driver=None, id=None, internal=None, ipam_configs=None, name=None, options=None, scope=None)

A collection of values returned by getNetwork.

driver = None

(Optional, string) The driver of the Docker network. Possible values are bridge, host, overlay, macvlan. See [docker docs][networkdocs] for more details.

options = None

(Optional, map) Only available with bridge networks. See [docker docs][bridgeoptionsdocs] for more details.

  • internal (Optional, bool) Boolean flag for whether the network is internal.

  • ipam_config (Optional, map) See IPAM below for details.

  • scope (Optional, string) Scope of the network. One of swarm, global, or local.

class pulumi_docker.GetRegistryImageResult(name=None, sha256_digest=None, id=None)

A collection of values returned by getRegistryImage.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_docker.Network(resource_name, opts=None, attachable=None, check_duplicate=None, driver=None, ingress=None, internal=None, ipam_configs=None, ipam_driver=None, ipv6=None, labels=None, name=None, options=None, __props__=None, __name__=None, __opts__=None)

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

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attachable (pulumi.Input[bool]) – Enable manual container attachment to the network. Defaults to false.

  • check_duplicate (pulumi.Input[bool]) – Requests daemon to check for networks with same name.

  • driver (pulumi.Input[str]) – Name of the network driver to use. Defaults to bridge driver.

  • ingress (pulumi.Input[bool]) – Create swarm routing-mesh network. Defaults to false.

  • internal (pulumi.Input[bool]) – Restrict external access to the network. Defaults to false.

  • ipam_configs (pulumi.Input[list]) – See IPAM config below for details.

  • ipam_driver (pulumi.Input[str]) – Driver used by the custom IP scheme of the network.

  • ipv6 (pulumi.Input[bool]) – Enable IPv6 networking. Defaults to false.

  • labels (pulumi.Input[dict]) – User-defined key/value metadata.

  • name (pulumi.Input[str]) – The name of the Docker network.

  • options (pulumi.Input[dict]) – Network specific options to be used by the drivers.

The ipam_configs object supports the following:

  • auxAddress (pulumi.Input[dict])

  • gateway (pulumi.Input[str])

  • ipRange (pulumi.Input[str])

  • subnet (pulumi.Input[str])

attachable = None

Enable manual container attachment to the network. Defaults to false.

check_duplicate = None

Requests daemon to check for networks with same name.

driver = None

Name of the network driver to use. Defaults to bridge driver.

ingress = None

Create swarm routing-mesh network. Defaults to false.

internal = None

Restrict external access to the network. Defaults to false.

ipam_configs = None

See IPAM config below for details.

  • auxAddress (dict)

  • gateway (str)

  • ipRange (str)

  • subnet (str)

ipam_driver = None

Driver used by the custom IP scheme of the network.

ipv6 = None

Enable IPv6 networking. Defaults to false.

labels = None

User-defined key/value metadata.

name = None

The name of the Docker network.

options = None

Network specific options to be used by the drivers.

static get(resource_name, id, opts=None, attachable=None, check_duplicate=None, driver=None, ingress=None, internal=None, ipam_configs=None, ipam_driver=None, ipv6=None, labels=None, name=None, options=None, scope=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attachable (pulumi.Input[bool]) – Enable manual container attachment to the network. Defaults to false.

  • check_duplicate (pulumi.Input[bool]) – Requests daemon to check for networks with same name.

  • driver (pulumi.Input[str]) – Name of the network driver to use. Defaults to bridge driver.

  • ingress (pulumi.Input[bool]) – Create swarm routing-mesh network. Defaults to false.

  • internal (pulumi.Input[bool]) – Restrict external access to the network. Defaults to false.

  • ipam_configs (pulumi.Input[list]) – See IPAM config below for details.

  • ipam_driver (pulumi.Input[str]) – Driver used by the custom IP scheme of the network.

  • ipv6 (pulumi.Input[bool]) – Enable IPv6 networking. Defaults to false.

  • labels (pulumi.Input[dict]) – User-defined key/value metadata.

  • name (pulumi.Input[str]) – The name of the Docker network.

  • options (pulumi.Input[dict]) – Network specific options to be used by the drivers.

The ipam_configs object supports the following:

  • auxAddress (pulumi.Input[dict])

  • gateway (pulumi.Input[str])

  • ipRange (pulumi.Input[str])

  • subnet (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_docker.Provider(resource_name, opts=None, ca_material=None, cert_material=None, cert_path=None, host=None, key_material=None, registry_auth=None, __props__=None, __name__=None, __opts__=None)

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

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

The registry_auth object supports the following:

  • address (pulumi.Input[str])

  • configFile (pulumi.Input[str])

  • password (pulumi.Input[str])

  • username (pulumi.Input[str])

static get(resource_name, id, opts=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_docker.RemoteImage(resource_name, opts=None, keep_locally=None, name=None, pull_trigger=None, pull_triggers=None, __props__=None, __name__=None, __opts__=None)

Pulls a Docker image to a given Docker host from a Docker Registry.

This resource will not pull new layers of the image automatically unless used in conjunction with `.getRegistryImage`` <https://www.terraform.io/docs/providers/docker/d/registry_image.html>`_ data source to update the pull_triggers field.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • keep_locally (pulumi.Input[bool]) – If true, then the Docker image won’t be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

  • name (pulumi.Input[str]) – The name of the Docker image, including any tags or SHA256 repo digests.

  • pull_trigger (pulumi.Input[str]) – Deprecated, use pull_triggers instead.

  • pull_triggers (pulumi.Input[list]) – List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the .getRegistryImage data source to trigger an image update.

keep_locally = None

If true, then the Docker image won’t be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

name = None

The name of the Docker image, including any tags or SHA256 repo digests.

pull_trigger = None

Deprecated, use pull_triggers instead.

pull_triggers = None

List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the .getRegistryImage data source to trigger an image update.

static get(resource_name, id, opts=None, keep_locally=None, latest=None, name=None, pull_trigger=None, pull_triggers=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • keep_locally (pulumi.Input[bool]) – If true, then the Docker image won’t be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.

  • name (pulumi.Input[str]) – The name of the Docker image, including any tags or SHA256 repo digests.

  • pull_trigger (pulumi.Input[str]) – Deprecated, use pull_triggers instead.

  • pull_triggers (pulumi.Input[list]) –

    List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the .getRegistryImage data source to trigger an image update.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_docker.Secret(resource_name, opts=None, data=None, labels=None, name=None, __props__=None, __name__=None, __opts__=None)

Manages the secrets of a Docker service in a swarm.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • data (pulumi.Input[str]) – The base64 encoded data of the secret.

  • labels (pulumi.Input[dict]) – User-defined key/value metadata.

  • name (pulumi.Input[str]) – The name of the Docker secret.

data = None

The base64 encoded data of the secret.

labels = None

User-defined key/value metadata.

name = None

The name of the Docker secret.

static get(resource_name, id, opts=None, data=None, labels=None, name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • data (pulumi.Input[str]) – The base64 encoded data of the secret.

  • labels (pulumi.Input[dict]) – User-defined key/value metadata.

  • name (pulumi.Input[str]) – The name of the Docker secret.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_docker.Service(resource_name, opts=None, auth=None, converge_config=None, endpoint_spec=None, labels=None, mode=None, name=None, rollback_config=None, task_spec=None, update_config=None, __props__=None, __name__=None, __opts__=None)

Create a Service resource with the given unique name, props, and options.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • auth (pulumi.Input[dict]) – See Auth below for details.

  • converge_config (pulumi.Input[dict]) – See Converge Config below for details.

  • endpoint_spec (pulumi.Input[dict]) – See EndpointSpec below for details.

  • mode (pulumi.Input[dict]) – The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

  • name (pulumi.Input[str]) – A random name for the port.

  • rollback_config (pulumi.Input[dict]) – See RollbackConfig below for details.

  • task_spec (pulumi.Input[dict]) – See TaskSpec below for details.

  • update_config (pulumi.Input[dict]) – See UpdateConfig below for details.

The auth object supports the following:

  • password (pulumi.Input[str]) - The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

  • server_address (pulumi.Input[str]) - The address of the registry server

  • username (pulumi.Input[str]) - The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

The converge_config object supports the following:

  • delay (pulumi.Input[str])

  • timeout (pulumi.Input[str])

The endpoint_spec object supports the following:

  • mode (pulumi.Input[str]) - The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

  • ports (pulumi.Input[list]) - See Ports below for details.

    • name (pulumi.Input[str]) - A random name for the port.

    • protocol (pulumi.Input[str]) - Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

    • publishMode (pulumi.Input[str]) - Represents the mode in which the port is to be published: ingress|host

    • publishedPort (pulumi.Input[float]) - The port on the swarm hosts. If not set the value of target_port will be used.

    • targetPort (pulumi.Input[float]) - Port inside the container.

The mode object supports the following:

  • global (pulumi.Input[bool])

  • replicated (pulumi.Input[dict])

    • replicas (pulumi.Input[float])

The rollback_config object supports the following:

  • delay (pulumi.Input[str])

  • failureAction (pulumi.Input[str])

  • maxFailureRatio (pulumi.Input[str])

  • monitor (pulumi.Input[str])

  • order (pulumi.Input[str])

  • parallelism (pulumi.Input[float])

The task_spec object supports the following:

  • containerSpec (pulumi.Input[dict])

    • args (pulumi.Input[list])

    • commands (pulumi.Input[list])

    • configs (pulumi.Input[list])

      • configId (pulumi.Input[str]) - ConfigID represents the ID of the specific config.

      • configName (pulumi.Input[str]) - The name of the config that this references, but internally it is just provided for lookup/display purposes

      • fileName (pulumi.Input[str]) - Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

    • dir (pulumi.Input[str])

    • dnsConfig (pulumi.Input[dict])

      • nameservers (pulumi.Input[list])

      • options (pulumi.Input[list]) - The options for the logging driver, e.g.

      • searches (pulumi.Input[list])

    • env (pulumi.Input[dict])

    • groups (pulumi.Input[list])

    • healthcheck (pulumi.Input[dict])

      • interval (pulumi.Input[str])

      • retries (pulumi.Input[float])

      • startPeriod (pulumi.Input[str])

      • tests (pulumi.Input[list])

      • timeout (pulumi.Input[str])

    • hostname (pulumi.Input[str])

    • hosts (pulumi.Input[list])

      • host (pulumi.Input[str])

      • ip (pulumi.Input[str])

    • image (pulumi.Input[str])

    • isolation (pulumi.Input[str])

    • labels (pulumi.Input[dict])

    • mounts (pulumi.Input[list])

      • bindOptions (pulumi.Input[dict])

        • propagation (pulumi.Input[str])

      • read_only (pulumi.Input[bool])

      • source (pulumi.Input[str])

      • target (pulumi.Input[str])

      • tmpfsOptions (pulumi.Input[dict])

        • mode (pulumi.Input[float]) - The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

        • sizeBytes (pulumi.Input[float])

      • type (pulumi.Input[str])

      • volumeOptions (pulumi.Input[dict])

        • driverName (pulumi.Input[str])

        • driverOptions (pulumi.Input[dict])

        • labels (pulumi.Input[dict])

        • noCopy (pulumi.Input[bool])

    • privileges (pulumi.Input[dict])

      • credentialSpec (pulumi.Input[dict])

        • file (pulumi.Input[str])

        • registry (pulumi.Input[str])

      • seLinuxContext (pulumi.Input[dict])

        • disable (pulumi.Input[bool])

        • level (pulumi.Input[str])

        • role (pulumi.Input[str])

        • type (pulumi.Input[str])

        • user (pulumi.Input[str])

    • read_only (pulumi.Input[bool])

    • secrets (pulumi.Input[list])

      • fileName (pulumi.Input[str]) - Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

      • secretId (pulumi.Input[str])

      • secretName (pulumi.Input[str])

    • stopGracePeriod (pulumi.Input[str])

    • stopSignal (pulumi.Input[str])

    • user (pulumi.Input[str])

  • forceUpdate (pulumi.Input[float])

  • log_driver (pulumi.Input[dict])

    • name (pulumi.Input[str]) - A random name for the port.

    • options (pulumi.Input[dict]) - The options for the logging driver, e.g.

  • networks (pulumi.Input[list])

  • placement (pulumi.Input[dict])

    • constraints (pulumi.Input[list])

    • platforms (pulumi.Input[list])

      • architecture (pulumi.Input[str])

      • os (pulumi.Input[str])

    • prefs (pulumi.Input[list])

  • resources (pulumi.Input[dict])

    • limits (pulumi.Input[dict])

      • genericResources (pulumi.Input[dict])

        • discreteResourcesSpecs (pulumi.Input[list])

        • namedResourcesSpecs (pulumi.Input[list])

      • memoryBytes (pulumi.Input[float])

      • nanoCpus (pulumi.Input[float])

    • reservation (pulumi.Input[dict])

      • genericResources (pulumi.Input[dict])

        • discreteResourcesSpecs (pulumi.Input[list])

        • namedResourcesSpecs (pulumi.Input[list])

      • memoryBytes (pulumi.Input[float])

      • nanoCpus (pulumi.Input[float])

  • restartPolicy (pulumi.Input[dict])

    • condition (pulumi.Input[str])

    • delay (pulumi.Input[str])

    • maxAttempts (pulumi.Input[float])

    • window (pulumi.Input[str])

  • runtime (pulumi.Input[str])

The update_config object supports the following:

  • delay (pulumi.Input[str])

  • failureAction (pulumi.Input[str])

  • maxFailureRatio (pulumi.Input[str])

  • monitor (pulumi.Input[str])

  • order (pulumi.Input[str])

  • parallelism (pulumi.Input[float])

auth = None

See Auth below for details.

  • password (str) - The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

  • server_address (str) - The address of the registry server

  • username (str) - The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

converge_config = None

See Converge Config below for details.

  • delay (str)

  • timeout (str)

endpoint_spec = None

See EndpointSpec below for details.

  • mode (str) - The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

  • ports (list) - See Ports below for details.

    • name (str) - A random name for the port.

    • protocol (str) - Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

    • publishMode (str) - Represents the mode in which the port is to be published: ingress|host

    • publishedPort (float) - The port on the swarm hosts. If not set the value of target_port will be used.

    • targetPort (float) - Port inside the container.

mode = None

The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

  • global (bool)

  • replicated (dict)

    • replicas (float)

name = None

A random name for the port.

rollback_config = None

See RollbackConfig below for details.

  • delay (str)

  • failureAction (str)

  • maxFailureRatio (str)

  • monitor (str)

  • order (str)

  • parallelism (float)

task_spec = None

See TaskSpec below for details.

  • containerSpec (dict)

    • args (list)

    • commands (list)

    • configs (list)

      • configId (str) - ConfigID represents the ID of the specific config.

      • configName (str) - The name of the config that this references, but internally it is just provided for lookup/display purposes

      • fileName (str) - Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

    • dir (str)

    • dnsConfig (dict)

      • nameservers (list)

      • options (list) - The options for the logging driver, e.g.

      • searches (list)

    • env (dict)

    • groups (list)

    • healthcheck (dict)

      • interval (str)

      • retries (float)

      • startPeriod (str)

      • tests (list)

      • timeout (str)

    • hostname (str)

    • hosts (list)

      • host (str)

      • ip (str)

    • image (str)

    • isolation (str)

    • labels (dict)

    • mounts (list)

      • bindOptions (dict)

        • propagation (str)

      • read_only (bool)

      • source (str)

      • target (str)

      • tmpfsOptions (dict)

        • mode (float) - The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

        • sizeBytes (float)

      • type (str)

      • volumeOptions (dict)

        • driverName (str)

        • driverOptions (dict)

        • labels (dict)

        • noCopy (bool)

    • privileges (dict)

      • credentialSpec (dict)

        • file (str)

        • registry (str)

      • seLinuxContext (dict)

        • disable (bool)

        • level (str)

        • role (str)

        • type (str)

        • user (str)

    • read_only (bool)

    • secrets (list)

      • fileName (str) - Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

      • secretId (str)

      • secretName (str)

    • stopGracePeriod (str)

    • stopSignal (str)

    • user (str)

  • forceUpdate (float)

  • log_driver (dict)

    • name (str) - A random name for the port.

    • options (dict) - The options for the logging driver, e.g.

  • networks (list)

  • placement (dict)

    • constraints (list)

    • platforms (list)

      • architecture (str)

      • os (str)

    • prefs (list)

  • resources (dict)

    • limits (dict)

      • genericResources (dict)

        • discreteResourcesSpecs (list)

        • namedResourcesSpecs (list)

      • memoryBytes (float)

      • nanoCpus (float)

    • reservation (dict)

      • genericResources (dict)

        • discreteResourcesSpecs (list)

        • namedResourcesSpecs (list)

      • memoryBytes (float)

      • nanoCpus (float)

  • restartPolicy (dict)

    • condition (str)

    • delay (str)

    • maxAttempts (float)

    • window (str)

  • runtime (str)

update_config = None

See UpdateConfig below for details.

  • delay (str)

  • failureAction (str)

  • maxFailureRatio (str)

  • monitor (str)

  • order (str)

  • parallelism (float)

static get(resource_name, id, opts=None, auth=None, converge_config=None, endpoint_spec=None, labels=None, mode=None, name=None, rollback_config=None, task_spec=None, update_config=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • auth (pulumi.Input[dict]) – See Auth below for details.

  • converge_config (pulumi.Input[dict]) – See Converge Config below for details.

  • endpoint_spec (pulumi.Input[dict]) – See EndpointSpec below for details.

  • mode (pulumi.Input[dict]) – The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

  • name (pulumi.Input[str]) – A random name for the port.

  • rollback_config (pulumi.Input[dict]) – See RollbackConfig below for details.

  • task_spec (pulumi.Input[dict]) – See TaskSpec below for details.

  • update_config (pulumi.Input[dict]) – See UpdateConfig below for details.

The auth object supports the following:

  • password (pulumi.Input[str]) - The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

  • server_address (pulumi.Input[str]) - The address of the registry server

  • username (pulumi.Input[str]) - The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

The converge_config object supports the following:

  • delay (pulumi.Input[str])

  • timeout (pulumi.Input[str])

The endpoint_spec object supports the following:

  • mode (pulumi.Input[str]) - The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

  • ports (pulumi.Input[list]) - See Ports below for details.

    • name (pulumi.Input[str]) - A random name for the port.

    • protocol (pulumi.Input[str]) - Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

    • publishMode (pulumi.Input[str]) - Represents the mode in which the port is to be published: ingress|host

    • publishedPort (pulumi.Input[float]) - The port on the swarm hosts. If not set the value of target_port will be used.

    • targetPort (pulumi.Input[float]) - Port inside the container.

The mode object supports the following:

  • global (pulumi.Input[bool])

  • replicated (pulumi.Input[dict])

    • replicas (pulumi.Input[float])

The rollback_config object supports the following:

  • delay (pulumi.Input[str])

  • failureAction (pulumi.Input[str])

  • maxFailureRatio (pulumi.Input[str])

  • monitor (pulumi.Input[str])

  • order (pulumi.Input[str])

  • parallelism (pulumi.Input[float])

The task_spec object supports the following:

  • containerSpec (pulumi.Input[dict])

    • args (pulumi.Input[list])

    • commands (pulumi.Input[list])

    • configs (pulumi.Input[list])

      • configId (pulumi.Input[str]) - ConfigID represents the ID of the specific config.

      • configName (pulumi.Input[str]) - The name of the config that this references, but internally it is just provided for lookup/display purposes

      • fileName (pulumi.Input[str]) - Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

    • dir (pulumi.Input[str])

    • dnsConfig (pulumi.Input[dict])

      • nameservers (pulumi.Input[list])

      • options (pulumi.Input[list]) - The options for the logging driver, e.g.

      • searches (pulumi.Input[list])

    • env (pulumi.Input[dict])

    • groups (pulumi.Input[list])

    • healthcheck (pulumi.Input[dict])

      • interval (pulumi.Input[str])

      • retries (pulumi.Input[float])

      • startPeriod (pulumi.Input[str])

      • tests (pulumi.Input[list])

      • timeout (pulumi.Input[str])

    • hostname (pulumi.Input[str])

    • hosts (pulumi.Input[list])

      • host (pulumi.Input[str])

      • ip (pulumi.Input[str])

    • image (pulumi.Input[str])

    • isolation (pulumi.Input[str])

    • labels (pulumi.Input[dict])

    • mounts (pulumi.Input[list])

      • bindOptions (pulumi.Input[dict])

        • propagation (pulumi.Input[str])

      • read_only (pulumi.Input[bool])

      • source (pulumi.Input[str])

      • target (pulumi.Input[str])

      • tmpfsOptions (pulumi.Input[dict])

        • mode (pulumi.Input[float]) - The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

        • sizeBytes (pulumi.Input[float])

      • type (pulumi.Input[str])

      • volumeOptions (pulumi.Input[dict])

        • driverName (pulumi.Input[str])

        • driverOptions (pulumi.Input[dict])

        • labels (pulumi.Input[dict])

        • noCopy (pulumi.Input[bool])

    • privileges (pulumi.Input[dict])

      • credentialSpec (pulumi.Input[dict])

        • file (pulumi.Input[str])

        • registry (pulumi.Input[str])

      • seLinuxContext (pulumi.Input[dict])

        • disable (pulumi.Input[bool])

        • level (pulumi.Input[str])

        • role (pulumi.Input[str])

        • type (pulumi.Input[str])

        • user (pulumi.Input[str])

    • read_only (pulumi.Input[bool])

    • secrets (pulumi.Input[list])

      • fileName (pulumi.Input[str]) - Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

      • secretId (pulumi.Input[str])

      • secretName (pulumi.Input[str])

    • stopGracePeriod (pulumi.Input[str])

    • stopSignal (pulumi.Input[str])

    • user (pulumi.Input[str])

  • forceUpdate (pulumi.Input[float])

  • log_driver (pulumi.Input[dict])

    • name (pulumi.Input[str]) - A random name for the port.

    • options (pulumi.Input[dict]) - The options for the logging driver, e.g.

  • networks (pulumi.Input[list])

  • placement (pulumi.Input[dict])

    • constraints (pulumi.Input[list])

    • platforms (pulumi.Input[list])

      • architecture (pulumi.Input[str])

      • os (pulumi.Input[str])

    • prefs (pulumi.Input[list])

  • resources (pulumi.Input[dict])

    • limits (pulumi.Input[dict])

      • genericResources (pulumi.Input[dict])

        • discreteResourcesSpecs (pulumi.Input[list])

        • namedResourcesSpecs (pulumi.Input[list])

      • memoryBytes (pulumi.Input[float])

      • nanoCpus (pulumi.Input[float])

    • reservation (pulumi.Input[dict])

      • genericResources (pulumi.Input[dict])

        • discreteResourcesSpecs (pulumi.Input[list])

        • namedResourcesSpecs (pulumi.Input[list])

      • memoryBytes (pulumi.Input[float])

      • nanoCpus (pulumi.Input[float])

  • restartPolicy (pulumi.Input[dict])

    • condition (pulumi.Input[str])

    • delay (pulumi.Input[str])

    • maxAttempts (pulumi.Input[float])

    • window (pulumi.Input[str])

  • runtime (pulumi.Input[str])

The update_config object supports the following:

  • delay (pulumi.Input[str])

  • failureAction (pulumi.Input[str])

  • maxFailureRatio (pulumi.Input[str])

  • monitor (pulumi.Input[str])

  • order (pulumi.Input[str])

  • parallelism (pulumi.Input[float])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_docker.Volume(resource_name, opts=None, driver=None, driver_opts=None, labels=None, name=None, __props__=None, __name__=None, __opts__=None)

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

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • driver (pulumi.Input[str]) – Driver type for the volume (defaults to local).

  • driver_opts (pulumi.Input[dict]) – Options specific to the driver.

  • labels (pulumi.Input[dict]) – User-defined key/value metadata.

  • name (pulumi.Input[str]) – The name of the Docker volume (generated if not provided).

driver = None

Driver type for the volume (defaults to local).

driver_opts = None

Options specific to the driver.

labels = None

User-defined key/value metadata.

name = None

The name of the Docker volume (generated if not provided).

static get(resource_name, id, opts=None, driver=None, driver_opts=None, labels=None, mountpoint=None, name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • driver (pulumi.Input[str]) – Driver type for the volume (defaults to local).

  • driver_opts (pulumi.Input[dict]) – Options specific to the driver.

  • labels (pulumi.Input[dict]) – User-defined key/value metadata.

  • name (pulumi.Input[str]) – The name of the Docker volume (generated if not provided).

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_docker.get_network(id=None, ipam_configs=None, name=None, opts=None)

Finds a specific docker network and returns information about it.

Parameters
  • id (str) – The id of the Docker network.

  • name (str) – The name of the Docker network.

The ipam_configs object supports the following:

  • auxAddress (dict)

  • gateway (str)

  • ipRange (str)

  • subnet (str)

pulumi_docker.get_registry_image(name=None, opts=None)

Reads the image metadata from a Docker Registry. Used in conjunction with the docker_image resource to keep an image up to date on the latest available version of the tag.

Parameters

name (str) – The name of the Docker image, including any tags. e.g. alpine:latest