# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from . import _utilities, _tables
from . import outputs
from ._inputs import *

__all__ = ['Container']


class Container(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 attach: Optional[pulumi.Input[bool]] = None,
                 capabilities: Optional[pulumi.Input[pulumi.InputType['ContainerCapabilitiesArgs']]] = None,
                 command: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 cpu_set: Optional[pulumi.Input[str]] = None,
                 cpu_shares: Optional[pulumi.Input[int]] = None,
                 destroy_grace_seconds: Optional[pulumi.Input[int]] = None,
                 devices: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerDeviceArgs']]]]] = None,
                 dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 dns_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 dns_searches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 domainname: Optional[pulumi.Input[str]] = None,
                 entrypoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 envs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 group_adds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 healthcheck: Optional[pulumi.Input[pulumi.InputType['ContainerHealthcheckArgs']]] = None,
                 hostname: Optional[pulumi.Input[str]] = None,
                 hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerHostArgs']]]]] = None,
                 image: Optional[pulumi.Input[str]] = None,
                 init: Optional[pulumi.Input[bool]] = None,
                 ipc_mode: Optional[pulumi.Input[str]] = None,
                 labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerLabelArgs']]]]] = None,
                 links: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 log_driver: Optional[pulumi.Input[str]] = None,
                 log_opts: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 logs: Optional[pulumi.Input[bool]] = None,
                 max_retry_count: Optional[pulumi.Input[int]] = None,
                 memory: Optional[pulumi.Input[int]] = None,
                 memory_swap: Optional[pulumi.Input[int]] = None,
                 mounts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerMountArgs']]]]] = None,
                 must_run: Optional[pulumi.Input[bool]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 network_mode: Optional[pulumi.Input[str]] = None,
                 networks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 networks_advanced: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerNetworksAdvancedArgs']]]]] = None,
                 pid_mode: Optional[pulumi.Input[str]] = None,
                 ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerPortArgs']]]]] = None,
                 privileged: Optional[pulumi.Input[bool]] = None,
                 publish_all_ports: Optional[pulumi.Input[bool]] = None,
                 read_only: Optional[pulumi.Input[bool]] = None,
                 remove_volumes: Optional[pulumi.Input[bool]] = None,
                 restart: Optional[pulumi.Input[str]] = None,
                 rm: Optional[pulumi.Input[bool]] = None,
                 security_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 shm_size: Optional[pulumi.Input[int]] = None,
                 start: Optional[pulumi.Input[bool]] = None,
                 stdin_open: Optional[pulumi.Input[bool]] = None,
                 sysctls: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 tmpfs: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 tty: Optional[pulumi.Input[bool]] = None,
                 ulimits: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUlimitArgs']]]]] = None,
                 uploads: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUploadArgs']]]]] = None,
                 user: Optional[pulumi.Input[str]] = None,
                 userns_mode: Optional[pulumi.Input[str]] = None,
                 volumes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerVolumeArgs']]]]] = None,
                 working_dir: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Manages the lifecycle of a Docker container.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_docker as docker

        # Find the latest Ubuntu precise image.
        ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage", name="ubuntu:precise")
        # Start a container
        ubuntu_container = docker.Container("ubuntuContainer", image=ubuntu_remote_image.latest)
        ```

        ## Import

        Docker containers can be imported using the long id, e.g. for a container named `foo`

        ```sh
         $ pulumi import docker:index/container:Container foo $(docker inspect -f {{.ID}} foo)
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[bool] attach: If true attach to the container after its creation and waits the end of his execution.
        :param pulumi.Input[pulumi.InputType['ContainerCapabilitiesArgs']] capabilities: See Capabilities below for details.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] command: 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"]`.
        :param pulumi.Input[str] cpu_set: A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. `0-1`.
        :param pulumi.Input[int] cpu_shares: CPU shares (relative weight) for the container.
        :param pulumi.Input[int] destroy_grace_seconds: If defined will attempt to stop the container before destroying. Container will be destroyed after `n` seconds or on successful stop.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerDeviceArgs']]]] devices: See Devices below for details.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] dns: Set of DNS servers.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_opts: Set of DNS options used by the DNS provider(s), see `resolv.conf` documentation for valid list of options.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_searches: Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.
        :param pulumi.Input[str] domainname: Domain name of the container.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] entrypoints: 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"]`.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] envs: Environment variables to set.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] group_adds: Add additional groups to run as.
        :param pulumi.Input[pulumi.InputType['ContainerHealthcheckArgs']] healthcheck: See Healthcheck below for details.
        :param pulumi.Input[str] hostname: Hostname of the container.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerHostArgs']]]] hosts: Hostname to add.
        :param pulumi.Input[str] image: 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.
        :param pulumi.Input[bool] init: Configured whether an init process should be injected for this container. If unset this will default to the `dockerd` defaults.
        :param pulumi.Input[str] ipc_mode: IPC sharing mode for the container. Possible values are: `none`, `private`, `shareable`, `container:<name|id>` or `host`.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerLabelArgs']]]] labels: Adding labels.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] links: Set of links for link based
               connectivity between containers that are running on the same host.
        :param pulumi.Input[str] log_driver: The logging driver to use for the container.
               Defaults to "json-file".
        :param pulumi.Input[Mapping[str, Any]] log_opts: Key/value pairs to use as options for
               the logging driver.
        :param pulumi.Input[bool] logs: Save the container logs (`attach` must be enabled).
        :param pulumi.Input[int] max_retry_count: The maximum amount of times to an attempt
               a restart when `restart` is set to "on-failure"
        :param pulumi.Input[int] memory: The memory limit for the container in MBs.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerMountArgs']]]] mounts: See Mounts below for details.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] network_aliases: Network aliases of the container for user-defined networks only. *Deprecated:* use `networks_advanced` instead.
        :param pulumi.Input[str] network_mode: Network mode of the container.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] networks: Id of the networks in which the
               container is. *Deprecated:* use `networks_advanced` instead.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerNetworksAdvancedArgs']]]] networks_advanced: See Networks Advanced below for details. If this block has priority to the deprecated `network_alias` and `network` properties.
        :param pulumi.Input[str] pid_mode: The PID (Process) Namespace mode for the container. Either `container:<name|id>` or `host`.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerPortArgs']]]] ports: See Ports below for details.
        :param pulumi.Input[bool] privileged: Run container in privileged mode.
        :param pulumi.Input[bool] publish_all_ports: Publish all ports of the container.
        :param pulumi.Input[bool] read_only: If true, this volume will be readonly.
               Defaults to false.
        :param pulumi.Input[str] restart: The restart policy for the container. Must be
               one of "no", "on-failure", "always", "unless-stopped".
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_opts: Set of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
        :param pulumi.Input[int] shm_size: Size of `/dev/shm` in MBs.
        :param pulumi.Input[bool] start: If true, then the Docker container will be
               started after creation. If false, then the container is only created.
        :param pulumi.Input[bool] stdin_open: if true, keep STDIN open even if not attached (docker run -i)
        :param pulumi.Input[Mapping[str, Any]] sysctls: A map of kernel parameters (sysctls) to set in the container.
        :param pulumi.Input[Mapping[str, Any]] tmpfs: A map of container directories which should be replaced by `tmpfs mounts`, and their corresponding mount options.
        :param pulumi.Input[bool] tty: if true, allocate a pseudo-tty (docker run -t)
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUlimitArgs']]]] ulimits: See Ulimits below for
               details.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUploadArgs']]]] uploads: See File Upload below for details.
        :param pulumi.Input[str] user: User used for run the first process. Format is
               `user` or `user:group` which user and group can be passed literraly or
               by name.
        :param pulumi.Input[str] userns_mode: Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerVolumeArgs']]]] volumes: See Volumes below for details.
        :param pulumi.Input[str] working_dir: The working directory for commands to run in
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['attach'] = attach
            __props__['capabilities'] = capabilities
            __props__['command'] = command
            __props__['cpu_set'] = cpu_set
            __props__['cpu_shares'] = cpu_shares
            __props__['destroy_grace_seconds'] = destroy_grace_seconds
            __props__['devices'] = devices
            __props__['dns'] = dns
            __props__['dns_opts'] = dns_opts
            __props__['dns_searches'] = dns_searches
            __props__['domainname'] = domainname
            __props__['entrypoints'] = entrypoints
            __props__['envs'] = envs
            __props__['group_adds'] = group_adds
            __props__['healthcheck'] = healthcheck
            __props__['hostname'] = hostname
            __props__['hosts'] = hosts
            if image is None and not opts.urn:
                raise TypeError("Missing required property 'image'")
            __props__['image'] = image
            __props__['init'] = init
            __props__['ipc_mode'] = ipc_mode
            __props__['labels'] = labels
            if links is not None and not opts.urn:
                warnings.warn("""The --link flag is a legacy feature of Docker. It may eventually be removed.""", DeprecationWarning)
                pulumi.log.warn("links is deprecated: The --link flag is a legacy feature of Docker. It may eventually be removed.")
            __props__['links'] = links
            __props__['log_driver'] = log_driver
            __props__['log_opts'] = log_opts
            __props__['logs'] = logs
            __props__['max_retry_count'] = max_retry_count
            __props__['memory'] = memory
            __props__['memory_swap'] = memory_swap
            __props__['mounts'] = mounts
            __props__['must_run'] = must_run
            __props__['name'] = name
            if network_aliases is not None and not opts.urn:
                warnings.warn("""Use networks_advanced instead. Will be removed in v2.0.0""", DeprecationWarning)
                pulumi.log.warn("network_aliases is deprecated: Use networks_advanced instead. Will be removed in v2.0.0")
            __props__['network_aliases'] = network_aliases
            __props__['network_mode'] = network_mode
            if networks is not None and not opts.urn:
                warnings.warn("""Use networks_advanced instead. Will be removed in v2.0.0""", DeprecationWarning)
                pulumi.log.warn("networks is deprecated: Use networks_advanced instead. Will be removed in v2.0.0")
            __props__['networks'] = networks
            __props__['networks_advanced'] = networks_advanced
            __props__['pid_mode'] = pid_mode
            __props__['ports'] = ports
            __props__['privileged'] = privileged
            __props__['publish_all_ports'] = publish_all_ports
            __props__['read_only'] = read_only
            __props__['remove_volumes'] = remove_volumes
            __props__['restart'] = restart
            __props__['rm'] = rm
            __props__['security_opts'] = security_opts
            __props__['shm_size'] = shm_size
            __props__['start'] = start
            __props__['stdin_open'] = stdin_open
            __props__['sysctls'] = sysctls
            __props__['tmpfs'] = tmpfs
            __props__['tty'] = tty
            __props__['ulimits'] = ulimits
            __props__['uploads'] = uploads
            __props__['user'] = user
            __props__['userns_mode'] = userns_mode
            __props__['volumes'] = volumes
            __props__['working_dir'] = working_dir
            __props__['bridge'] = None
            __props__['container_logs'] = None
            __props__['exit_code'] = None
            __props__['gateway'] = None
            __props__['ip_address'] = None
            __props__['ip_prefix_length'] = None
            __props__['network_datas'] = None
        super(Container, __self__).__init__(
            'docker:index/container:Container',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            attach: Optional[pulumi.Input[bool]] = None,
            bridge: Optional[pulumi.Input[str]] = None,
            capabilities: Optional[pulumi.Input[pulumi.InputType['ContainerCapabilitiesArgs']]] = None,
            command: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            container_logs: Optional[pulumi.Input[str]] = None,
            cpu_set: Optional[pulumi.Input[str]] = None,
            cpu_shares: Optional[pulumi.Input[int]] = None,
            destroy_grace_seconds: Optional[pulumi.Input[int]] = None,
            devices: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerDeviceArgs']]]]] = None,
            dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            dns_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            dns_searches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            domainname: Optional[pulumi.Input[str]] = None,
            entrypoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            envs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            exit_code: Optional[pulumi.Input[int]] = None,
            gateway: Optional[pulumi.Input[str]] = None,
            group_adds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            healthcheck: Optional[pulumi.Input[pulumi.InputType['ContainerHealthcheckArgs']]] = None,
            hostname: Optional[pulumi.Input[str]] = None,
            hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerHostArgs']]]]] = None,
            image: Optional[pulumi.Input[str]] = None,
            init: Optional[pulumi.Input[bool]] = None,
            ip_address: Optional[pulumi.Input[str]] = None,
            ip_prefix_length: Optional[pulumi.Input[int]] = None,
            ipc_mode: Optional[pulumi.Input[str]] = None,
            labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerLabelArgs']]]]] = None,
            links: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            log_driver: Optional[pulumi.Input[str]] = None,
            log_opts: Optional[pulumi.Input[Mapping[str, Any]]] = None,
            logs: Optional[pulumi.Input[bool]] = None,
            max_retry_count: Optional[pulumi.Input[int]] = None,
            memory: Optional[pulumi.Input[int]] = None,
            memory_swap: Optional[pulumi.Input[int]] = None,
            mounts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerMountArgs']]]]] = None,
            must_run: Optional[pulumi.Input[bool]] = None,
            name: Optional[pulumi.Input[str]] = None,
            network_aliases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            network_datas: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerNetworkDataArgs']]]]] = None,
            network_mode: Optional[pulumi.Input[str]] = None,
            networks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            networks_advanced: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerNetworksAdvancedArgs']]]]] = None,
            pid_mode: Optional[pulumi.Input[str]] = None,
            ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerPortArgs']]]]] = None,
            privileged: Optional[pulumi.Input[bool]] = None,
            publish_all_ports: Optional[pulumi.Input[bool]] = None,
            read_only: Optional[pulumi.Input[bool]] = None,
            remove_volumes: Optional[pulumi.Input[bool]] = None,
            restart: Optional[pulumi.Input[str]] = None,
            rm: Optional[pulumi.Input[bool]] = None,
            security_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            shm_size: Optional[pulumi.Input[int]] = None,
            start: Optional[pulumi.Input[bool]] = None,
            stdin_open: Optional[pulumi.Input[bool]] = None,
            sysctls: Optional[pulumi.Input[Mapping[str, Any]]] = None,
            tmpfs: Optional[pulumi.Input[Mapping[str, Any]]] = None,
            tty: Optional[pulumi.Input[bool]] = None,
            ulimits: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUlimitArgs']]]]] = None,
            uploads: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUploadArgs']]]]] = None,
            user: Optional[pulumi.Input[str]] = None,
            userns_mode: Optional[pulumi.Input[str]] = None,
            volumes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerVolumeArgs']]]]] = None,
            working_dir: Optional[pulumi.Input[str]] = None) -> 'Container':
        """
        Get an existing Container resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[bool] attach: If true attach to the container after its creation and waits the end of his execution.
        :param pulumi.Input[str] bridge: The network bridge of the container as read from its NetworkSettings.
        :param pulumi.Input[pulumi.InputType['ContainerCapabilitiesArgs']] capabilities: See Capabilities below for details.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] command: 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"]`.
        :param pulumi.Input[str] container_logs: The logs of the container if its execution is done (`attach` must be disabled).
        :param pulumi.Input[str] cpu_set: A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. `0-1`.
        :param pulumi.Input[int] cpu_shares: CPU shares (relative weight) for the container.
        :param pulumi.Input[int] destroy_grace_seconds: If defined will attempt to stop the container before destroying. Container will be destroyed after `n` seconds or on successful stop.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerDeviceArgs']]]] devices: See Devices below for details.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] dns: Set of DNS servers.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_opts: Set of DNS options used by the DNS provider(s), see `resolv.conf` documentation for valid list of options.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_searches: Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.
        :param pulumi.Input[str] domainname: Domain name of the container.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] entrypoints: 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"]`.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] envs: Environment variables to set.
        :param pulumi.Input[int] exit_code: The exit code of the container if its execution is done (`must_run` must be disabled).
        :param pulumi.Input[str] gateway: *Deprecated:* Use `network_data` instead. The network gateway of the container as read from its
               NetworkSettings.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] group_adds: Add additional groups to run as.
        :param pulumi.Input[pulumi.InputType['ContainerHealthcheckArgs']] healthcheck: See Healthcheck below for details.
        :param pulumi.Input[str] hostname: Hostname of the container.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerHostArgs']]]] hosts: Hostname to add.
        :param pulumi.Input[str] image: 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.
        :param pulumi.Input[bool] init: Configured whether an init process should be injected for this container. If unset this will default to the `dockerd` defaults.
        :param pulumi.Input[str] ip_address: *Deprecated:* Use `network_data` instead. The IP address of the container's first network it.
        :param pulumi.Input[int] ip_prefix_length: *Deprecated:* Use `network_data` instead. The IP prefix length of the container as read from its
               NetworkSettings.
        :param pulumi.Input[str] ipc_mode: IPC sharing mode for the container. Possible values are: `none`, `private`, `shareable`, `container:<name|id>` or `host`.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerLabelArgs']]]] labels: Adding labels.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] links: Set of links for link based
               connectivity between containers that are running on the same host.
        :param pulumi.Input[str] log_driver: The logging driver to use for the container.
               Defaults to "json-file".
        :param pulumi.Input[Mapping[str, Any]] log_opts: Key/value pairs to use as options for
               the logging driver.
        :param pulumi.Input[bool] logs: Save the container logs (`attach` must be enabled).
        :param pulumi.Input[int] max_retry_count: The maximum amount of times to an attempt
               a restart when `restart` is set to "on-failure"
        :param pulumi.Input[int] memory: The memory limit for the container in MBs.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerMountArgs']]]] mounts: See Mounts below for details.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] network_aliases: Network aliases of the container for user-defined networks only. *Deprecated:* use `networks_advanced` instead.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerNetworkDataArgs']]]] network_datas: (Map of a block) The IP addresses of the container on each
               network. Key are the network names, values are the IP addresses.
        :param pulumi.Input[str] network_mode: Network mode of the container.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] networks: Id of the networks in which the
               container is. *Deprecated:* use `networks_advanced` instead.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerNetworksAdvancedArgs']]]] networks_advanced: See Networks Advanced below for details. If this block has priority to the deprecated `network_alias` and `network` properties.
        :param pulumi.Input[str] pid_mode: The PID (Process) Namespace mode for the container. Either `container:<name|id>` or `host`.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerPortArgs']]]] ports: See Ports below for details.
        :param pulumi.Input[bool] privileged: Run container in privileged mode.
        :param pulumi.Input[bool] publish_all_ports: Publish all ports of the container.
        :param pulumi.Input[bool] read_only: If true, this volume will be readonly.
               Defaults to false.
        :param pulumi.Input[str] restart: The restart policy for the container. Must be
               one of "no", "on-failure", "always", "unless-stopped".
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_opts: Set of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
        :param pulumi.Input[int] shm_size: Size of `/dev/shm` in MBs.
        :param pulumi.Input[bool] start: If true, then the Docker container will be
               started after creation. If false, then the container is only created.
        :param pulumi.Input[bool] stdin_open: if true, keep STDIN open even if not attached (docker run -i)
        :param pulumi.Input[Mapping[str, Any]] sysctls: A map of kernel parameters (sysctls) to set in the container.
        :param pulumi.Input[Mapping[str, Any]] tmpfs: A map of container directories which should be replaced by `tmpfs mounts`, and their corresponding mount options.
        :param pulumi.Input[bool] tty: if true, allocate a pseudo-tty (docker run -t)
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUlimitArgs']]]] ulimits: See Ulimits below for
               details.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerUploadArgs']]]] uploads: See File Upload below for details.
        :param pulumi.Input[str] user: User used for run the first process. Format is
               `user` or `user:group` which user and group can be passed literraly or
               by name.
        :param pulumi.Input[str] userns_mode: Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ContainerVolumeArgs']]]] volumes: See Volumes below for details.
        :param pulumi.Input[str] working_dir: The working directory for commands to run in
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

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

    @property
    @pulumi.getter
    def attach(self) -> pulumi.Output[Optional[bool]]:
        """
        If true attach to the container after its creation and waits the end of his execution.
        """
        return pulumi.get(self, "attach")

    @property
    @pulumi.getter
    def bridge(self) -> pulumi.Output[str]:
        """
        The network bridge of the container as read from its NetworkSettings.
        """
        return pulumi.get(self, "bridge")

    @property
    @pulumi.getter
    def capabilities(self) -> pulumi.Output[Optional['outputs.ContainerCapabilities']]:
        """
        See Capabilities below for details.
        """
        return pulumi.get(self, "capabilities")

    @property
    @pulumi.getter
    def command(self) -> pulumi.Output[Sequence[str]]:
        """
        The command to use to start the
        container. For example, to run `/usr/bin/myprogram -f baz.conf` set the
        command to be `["/usr/bin/myprogram", "-f", "baz.conf"]`.
        """
        return pulumi.get(self, "command")

    @property
    @pulumi.getter(name="containerLogs")
    def container_logs(self) -> pulumi.Output[str]:
        """
        The logs of the container if its execution is done (`attach` must be disabled).
        """
        return pulumi.get(self, "container_logs")

    @property
    @pulumi.getter(name="cpuSet")
    def cpu_set(self) -> pulumi.Output[Optional[str]]:
        """
        A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. `0-1`.
        """
        return pulumi.get(self, "cpu_set")

    @property
    @pulumi.getter(name="cpuShares")
    def cpu_shares(self) -> pulumi.Output[Optional[int]]:
        """
        CPU shares (relative weight) for the container.
        """
        return pulumi.get(self, "cpu_shares")

    @property
    @pulumi.getter(name="destroyGraceSeconds")
    def destroy_grace_seconds(self) -> pulumi.Output[Optional[int]]:
        """
        If defined will attempt to stop the container before destroying. Container will be destroyed after `n` seconds or on successful stop.
        """
        return pulumi.get(self, "destroy_grace_seconds")

    @property
    @pulumi.getter
    def devices(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerDevice']]]:
        """
        See Devices below for details.
        """
        return pulumi.get(self, "devices")

    @property
    @pulumi.getter
    def dns(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Set of DNS servers.
        """
        return pulumi.get(self, "dns")

    @property
    @pulumi.getter(name="dnsOpts")
    def dns_opts(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Set of DNS options used by the DNS provider(s), see `resolv.conf` documentation for valid list of options.
        """
        return pulumi.get(self, "dns_opts")

    @property
    @pulumi.getter(name="dnsSearches")
    def dns_searches(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Set of DNS search domains that are used when bare unqualified hostnames are used inside of the container.
        """
        return pulumi.get(self, "dns_searches")

    @property
    @pulumi.getter
    def domainname(self) -> pulumi.Output[Optional[str]]:
        """
        Domain name of the container.
        """
        return pulumi.get(self, "domainname")

    @property
    @pulumi.getter
    def entrypoints(self) -> pulumi.Output[Sequence[str]]:
        """
        The command to use as the
        Entrypoint for the container. The Entrypoint allows you to configure a
        container to run as an executable. For example, to run `/usr/bin/myprogram`
        when starting a container, set the entrypoint to be
        `["/usr/bin/myprogram"]`.
        """
        return pulumi.get(self, "entrypoints")

    @property
    @pulumi.getter
    def envs(self) -> pulumi.Output[Sequence[str]]:
        """
        Environment variables to set.
        """
        return pulumi.get(self, "envs")

    @property
    @pulumi.getter(name="exitCode")
    def exit_code(self) -> pulumi.Output[int]:
        """
        The exit code of the container if its execution is done (`must_run` must be disabled).
        """
        return pulumi.get(self, "exit_code")

    @property
    @pulumi.getter
    def gateway(self) -> pulumi.Output[str]:
        """
        *Deprecated:* Use `network_data` instead. The network gateway of the container as read from its
        NetworkSettings.
        """
        return pulumi.get(self, "gateway")

    @property
    @pulumi.getter(name="groupAdds")
    def group_adds(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Add additional groups to run as.
        """
        return pulumi.get(self, "group_adds")

    @property
    @pulumi.getter
    def healthcheck(self) -> pulumi.Output['outputs.ContainerHealthcheck']:
        """
        See Healthcheck below for details.
        """
        return pulumi.get(self, "healthcheck")

    @property
    @pulumi.getter
    def hostname(self) -> pulumi.Output[str]:
        """
        Hostname of the container.
        """
        return pulumi.get(self, "hostname")

    @property
    @pulumi.getter
    def hosts(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerHost']]]:
        """
        Hostname to add.
        """
        return pulumi.get(self, "hosts")

    @property
    @pulumi.getter
    def image(self) -> pulumi.Output[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.
        """
        return pulumi.get(self, "image")

    @property
    @pulumi.getter
    def init(self) -> pulumi.Output[bool]:
        """
        Configured whether an init process should be injected for this container. If unset this will default to the `dockerd` defaults.
        """
        return pulumi.get(self, "init")

    @property
    @pulumi.getter(name="ipAddress")
    def ip_address(self) -> pulumi.Output[str]:
        """
        *Deprecated:* Use `network_data` instead. The IP address of the container's first network it.
        """
        return pulumi.get(self, "ip_address")

    @property
    @pulumi.getter(name="ipPrefixLength")
    def ip_prefix_length(self) -> pulumi.Output[int]:
        """
        *Deprecated:* Use `network_data` instead. The IP prefix length of the container as read from its
        NetworkSettings.
        """
        return pulumi.get(self, "ip_prefix_length")

    @property
    @pulumi.getter(name="ipcMode")
    def ipc_mode(self) -> pulumi.Output[str]:
        """
        IPC sharing mode for the container. Possible values are: `none`, `private`, `shareable`, `container:<name|id>` or `host`.
        """
        return pulumi.get(self, "ipc_mode")

    @property
    @pulumi.getter
    def labels(self) -> pulumi.Output[Sequence['outputs.ContainerLabel']]:
        """
        Adding labels.
        """
        return pulumi.get(self, "labels")

    @property
    @pulumi.getter
    def links(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Set of links for link based
        connectivity between containers that are running on the same host.
        """
        return pulumi.get(self, "links")

    @property
    @pulumi.getter(name="logDriver")
    def log_driver(self) -> pulumi.Output[Optional[str]]:
        """
        The logging driver to use for the container.
        Defaults to "json-file".
        """
        return pulumi.get(self, "log_driver")

    @property
    @pulumi.getter(name="logOpts")
    def log_opts(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
        """
        Key/value pairs to use as options for
        the logging driver.
        """
        return pulumi.get(self, "log_opts")

    @property
    @pulumi.getter
    def logs(self) -> pulumi.Output[Optional[bool]]:
        """
        Save the container logs (`attach` must be enabled).
        """
        return pulumi.get(self, "logs")

    @property
    @pulumi.getter(name="maxRetryCount")
    def max_retry_count(self) -> pulumi.Output[Optional[int]]:
        """
        The maximum amount of times to an attempt
        a restart when `restart` is set to "on-failure"
        """
        return pulumi.get(self, "max_retry_count")

    @property
    @pulumi.getter
    def memory(self) -> pulumi.Output[Optional[int]]:
        """
        The memory limit for the container in MBs.
        """
        return pulumi.get(self, "memory")

    @property
    @pulumi.getter(name="memorySwap")
    def memory_swap(self) -> pulumi.Output[Optional[int]]:
        return pulumi.get(self, "memory_swap")

    @property
    @pulumi.getter
    def mounts(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerMount']]]:
        """
        See Mounts below for details.
        """
        return pulumi.get(self, "mounts")

    @property
    @pulumi.getter(name="mustRun")
    def must_run(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "must_run")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkAliases")
    def network_aliases(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Network aliases of the container for user-defined networks only. *Deprecated:* use `networks_advanced` instead.
        """
        return pulumi.get(self, "network_aliases")

    @property
    @pulumi.getter(name="networkDatas")
    def network_datas(self) -> pulumi.Output[Sequence['outputs.ContainerNetworkData']]:
        """
        (Map of a block) The IP addresses of the container on each
        network. Key are the network names, values are the IP addresses.
        """
        return pulumi.get(self, "network_datas")

    @property
    @pulumi.getter(name="networkMode")
    def network_mode(self) -> pulumi.Output[Optional[str]]:
        """
        Network mode of the container.
        """
        return pulumi.get(self, "network_mode")

    @property
    @pulumi.getter
    def networks(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Id of the networks in which the
        container is. *Deprecated:* use `networks_advanced` instead.
        """
        return pulumi.get(self, "networks")

    @property
    @pulumi.getter(name="networksAdvanced")
    def networks_advanced(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerNetworksAdvanced']]]:
        """
        See Networks Advanced below for details. If this block has priority to the deprecated `network_alias` and `network` properties.
        """
        return pulumi.get(self, "networks_advanced")

    @property
    @pulumi.getter(name="pidMode")
    def pid_mode(self) -> pulumi.Output[Optional[str]]:
        """
        The PID (Process) Namespace mode for the container. Either `container:<name|id>` or `host`.
        """
        return pulumi.get(self, "pid_mode")

    @property
    @pulumi.getter
    def ports(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerPort']]]:
        """
        See Ports below for details.
        """
        return pulumi.get(self, "ports")

    @property
    @pulumi.getter
    def privileged(self) -> pulumi.Output[Optional[bool]]:
        """
        Run container in privileged mode.
        """
        return pulumi.get(self, "privileged")

    @property
    @pulumi.getter(name="publishAllPorts")
    def publish_all_ports(self) -> pulumi.Output[Optional[bool]]:
        """
        Publish all ports of the container.
        """
        return pulumi.get(self, "publish_all_ports")

    @property
    @pulumi.getter(name="readOnly")
    def read_only(self) -> pulumi.Output[Optional[bool]]:
        """
        If true, this volume will be readonly.
        Defaults to false.
        """
        return pulumi.get(self, "read_only")

    @property
    @pulumi.getter(name="removeVolumes")
    def remove_volumes(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "remove_volumes")

    @property
    @pulumi.getter
    def restart(self) -> pulumi.Output[Optional[str]]:
        """
        The restart policy for the container. Must be
        one of "no", "on-failure", "always", "unless-stopped".
        """
        return pulumi.get(self, "restart")

    @property
    @pulumi.getter
    def rm(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "rm")

    @property
    @pulumi.getter(name="securityOpts")
    def security_opts(self) -> pulumi.Output[Sequence[str]]:
        """
        Set of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.
        """
        return pulumi.get(self, "security_opts")

    @property
    @pulumi.getter(name="shmSize")
    def shm_size(self) -> pulumi.Output[int]:
        """
        Size of `/dev/shm` in MBs.
        """
        return pulumi.get(self, "shm_size")

    @property
    @pulumi.getter
    def start(self) -> pulumi.Output[Optional[bool]]:
        """
        If true, then the Docker container will be
        started after creation. If false, then the container is only created.
        """
        return pulumi.get(self, "start")

    @property
    @pulumi.getter(name="stdinOpen")
    def stdin_open(self) -> pulumi.Output[Optional[bool]]:
        """
        if true, keep STDIN open even if not attached (docker run -i)
        """
        return pulumi.get(self, "stdin_open")

    @property
    @pulumi.getter
    def sysctls(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
        """
        A map of kernel parameters (sysctls) to set in the container.
        """
        return pulumi.get(self, "sysctls")

    @property
    @pulumi.getter
    def tmpfs(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
        """
        A map of container directories which should be replaced by `tmpfs mounts`, and their corresponding mount options.
        """
        return pulumi.get(self, "tmpfs")

    @property
    @pulumi.getter
    def tty(self) -> pulumi.Output[Optional[bool]]:
        """
        if true, allocate a pseudo-tty (docker run -t)
        """
        return pulumi.get(self, "tty")

    @property
    @pulumi.getter
    def ulimits(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerUlimit']]]:
        """
        See Ulimits below for
        details.
        """
        return pulumi.get(self, "ulimits")

    @property
    @pulumi.getter
    def uploads(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerUpload']]]:
        """
        See File Upload below for details.
        """
        return pulumi.get(self, "uploads")

    @property
    @pulumi.getter
    def user(self) -> pulumi.Output[Optional[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.
        """
        return pulumi.get(self, "user")

    @property
    @pulumi.getter(name="usernsMode")
    def userns_mode(self) -> pulumi.Output[Optional[str]]:
        """
        Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
        """
        return pulumi.get(self, "userns_mode")

    @property
    @pulumi.getter
    def volumes(self) -> pulumi.Output[Optional[Sequence['outputs.ContainerVolume']]]:
        """
        See Volumes below for details.
        """
        return pulumi.get(self, "volumes")

    @property
    @pulumi.getter(name="workingDir")
    def working_dir(self) -> pulumi.Output[Optional[str]]:
        """
        The working directory for commands to run in
        """
        return pulumi.get(self, "working_dir")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

