Create a container Run in API Explorer

POST /containers/create

Query parameters

  • name string

    Assign the specified name to the container. Must match /?[a-zA-Z0-9][a-zA-Z0-9_.-]+.

  • platform string

    Platform in the format os[/arch[/variant]] used for image lookup.

    When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a 404 status.

    If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the Warnings field in the response, for example;

    WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested

    Default value is empty.

Body Required

Container to create

  • Hostname string

    The hostname to use for the container, as a valid RFC 1123 hostname.

  • Domainname string

    The domain name to use for the container.

  • User string

    The user that commands are run as inside the container.

  • AttachStdin boolean

    Whether to attach to stdin.

    Default value is false.

  • AttachStdout boolean

    Whether to attach to stdout.

    Default value is true.

  • AttachStderr boolean

    Whether to attach to stderr.

    Default value is true.

  • ExposedPorts object

    An object mapping ports to an empty object in the form:

    {"<port>/<tcp|udp|sctp>": {}}

    Hide ExposedPorts attribute Show ExposedPorts attribute object
    • * object Additional properties

      Default value is {} (empty).

  • Tty boolean

    Attach standard streams to a TTY, including stdin if it is not closed.

    Default value is false.

  • OpenStdin boolean

    Open stdin

    Default value is false.

  • StdinOnce boolean

    Close stdin after one attached client disconnects

    Default value is false.

  • Env array[string]

    A list of environment variables to set inside the container in the form ["VAR=value", ...]. A variable without = is removed from the environment, rather than to have an empty value.

  • Cmd array[string]

    Command to run specified as a string or an array of strings.

  • Healthcheck object

    A test to perform to check that the container is healthy.

    Hide Healthcheck attributes Show Healthcheck attributes object
    • Test array[string]

      The test to perform. Possible values are:

      • [] inherit healthcheck from image or parent image
      • ["NONE"] disable healthcheck
      • ["CMD", args...] exec arguments directly
      • ["CMD-SHELL", command] run command with system's default shell
    • Interval integer(int64)

      The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

    • Timeout integer(int64)

      The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

    • Retries integer

      The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.

    • StartPeriod integer(int64)

      Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

    • StartInterval integer(int64)

      The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

  • ArgsEscaped boolean

    Command is already escaped (Windows only)

    Default value is false.

  • Image string

    The name (or reference) of the image to use when creating the container, or which was used when the container was created.

  • Volumes object

    An object mapping mount point paths inside the container to empty objects.

    Hide Volumes attribute Show Volumes attribute object
    • * object Additional properties

      Default value is {} (empty).

  • WorkingDir string

    The working directory for commands to run in.

  • Entrypoint array[string]

    The entry point for the container as a string or an array of strings.

    If the array consists of exactly one empty string ([""]) then the entry point is reset to system default (i.e., the entry point used by docker when there is no ENTRYPOINT instruction in the Dockerfile).

  • NetworkDisabled boolean

    Disable networking for the container.

  • MacAddress string

    MAC address of the container.

    Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead.

  • OnBuild array[string]

    ONBUILD metadata that were defined in the image's Dockerfile.

  • Labels object

    User-defined key/value metadata.

    Hide Labels attribute Show Labels attribute object
    • * string Additional properties
  • StopSignal string

    Signal to stop a container as a string or unsigned integer.

  • StopTimeout integer

    Timeout to stop a container in seconds.

    Default value is 10.

  • Shell array[string]

    Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

  • HostConfig object

    Container configuration that depends on the host we are running on

    Hide HostConfig attributes Show HostConfig attributes object
    • CpuShares integer

      An integer value representing this container's relative CPU weight versus other containers.

    • Memory integer(int64)

      Memory limit in bytes.

      Default value is 0.

    • CgroupParent string

      Path to cgroups under which the container's cgroup is created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups are created if they do not already exist.

    • BlkioWeight integer

      Block IO weight (relative weight).

      Minimum value is 0, maximum value is 1000.

    • BlkioWeightDevice array[object]

      Block IO weight (relative device weight) in the form:

      [{"Path": "device_path", "Weight": weight}]
      
      Hide BlkioWeightDevice attributes Show BlkioWeightDevice attributes object
      • Path string
      • Weight integer

        Minimum value is 0.

    • BlkioDeviceReadBps array[object]

      Limit read rate (bytes per second) from a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceReadBps attributes Show BlkioDeviceReadBps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • BlkioDeviceWriteBps array[object]

      Limit write rate (bytes per second) to a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceWriteBps attributes Show BlkioDeviceWriteBps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • BlkioDeviceReadIOps array[object]

      Limit read rate (IO per second) from a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceReadIOps attributes Show BlkioDeviceReadIOps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • BlkioDeviceWriteIOps array[object]

      Limit write rate (IO per second) to a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceWriteIOps attributes Show BlkioDeviceWriteIOps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • CpuPeriod integer(int64)

      The length of a CPU period in microseconds.

    • CpuQuota integer(int64)

      Microseconds of CPU time that the container can get in a CPU period.

    • CpuRealtimePeriod integer(int64)

      The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.

    • CpuRealtimeRuntime integer(int64)

      The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.

    • CpusetCpus string

      CPUs in which to allow execution (e.g., 0-3, 0,1).

    • CpusetMems string

      Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.

    • Devices array[object]

      A list of devices to add to the container.

      A device mapping between the host and container

      Hide Devices attributes Show Devices attributes object
      • PathOnHost string
      • PathInContainer string
      • CgroupPermissions string
    • DeviceCgroupRules array[string]

      a list of cgroup rules to apply to the container

    • DeviceRequests array[object]

      A list of requests for devices to be sent to device drivers.

      A request for devices to be sent to device drivers

      Hide DeviceRequests attributes Show DeviceRequests attributes object
      • Driver string
      • Count integer
      • DeviceIDs array[string]
      • Capabilities array[array]

        A list of capabilities; an OR list of AND lists of capabilities.

      • Options object

        Driver-specific options, specified as a key/value pairs. These options are passed directly to the driver.

        Hide Options attribute Show Options attribute object
        • * string Additional properties
    • KernelMemoryTCP integer(int64)

      Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime.

      This field is omitted when empty.

    • MemoryReservation integer(int64)

      Memory soft limit in bytes.

    • MemorySwap integer(int64)

      Total memory limit (memory + swap). Set as -1 to enable unlimited swap.

    • MemorySwappiness integer(int64)

      Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.

      Minimum value is 0, maximum value is 100.

    • NanoCpus integer(int64)

      CPU quota in units of 10-9 CPUs.

    • OomKillDisable boolean

      Disable OOM Killer for the container.

    • Init boolean

      Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.

    • PidsLimit integer(int64)

      Tune a container's PIDs limit. Set 0 or -1 for unlimited, or null to not change.

    • Ulimits array[object]

      A list of resource limits to set in the container. For example:

      {"Name": "nofile", "Soft": 1024, "Hard": 2048}
      
      Hide Ulimits attributes Show Ulimits attributes object
      • Name string

        Name of ulimit

      • Soft integer

        Soft limit

      • Hard integer

        Hard limit

    • CpuCount integer(int64)

      The number of usable CPUs (Windows only).

      On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.

    • CpuPercent integer(int64)

      The usable percentage of the available CPUs (Windows only).

      On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.

    • IOMaximumIOps integer(int64)

      Maximum IOps for the container system drive (Windows only)

    • IOMaximumBandwidth integer(int64)

      Maximum IO in bytes per second for the container system drive (Windows only).

    • Binds array[string]

      A list of volume bindings for this container. Each volume binding is a string in one of these forms:

      • host-src:container-dest[:options] to bind-mount a host path into the container. Both host-src, and container-dest must be an absolute path.
      • volume-name:container-dest[:options] to bind-mount a volume managed by a volume driver into the container. container-dest must be an absolute path.

      options is an optional, comma-delimited list of:

      • nocopy disables automatic copying of data from the container path to the volume. The nocopy flag only applies to named volumes.
      • [ro|rw] mounts a volume read-only or read-write, respectively. If omitted or set to rw, volumes are mounted read-write.
      • [z|Z] applies SELinux labels to allow or deny multiple containers to read and write to the same volume.
        • z: a shared content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing.
        • Z: a private unshared label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container's processes from using the content. By default, the labels set by the host operating system are not modified.
      • [[r]shared|[r]slave|[r]private] specifies mount propagation behavior. This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to shared. For slave volumes, the mount must be set to either shared or slave.
    • ContainerIDFile string

      Path to a file where the container ID is written

    • LogConfig object

      The logging configuration for this container

      Hide LogConfig attributes Show LogConfig attributes object
      • Type string

        Values are json-file, syslog, journald, gelf, fluentd, awslogs, splunk, etwlogs, or none.

      • Config object
        Hide Config attribute Show Config attribute object
        • * string Additional properties
    • NetworkMode string

      Network mode to use for this container. Supported standard values are: bridge, host, none, and container:<name|id>. Any other value is taken as a custom network's name to which this container should connect to.

    • PortBindings object

      PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format <port>/<protocol>, for example, 80/udp.

      If a container's port is mapped for multiple protocols, separate entries are added to the mapping table.

      Hide PortBindings attribute Show PortBindings attribute object
      • * array[object] Additional properties

        PortBinding represents a binding between a host IP address and a host port.

        Hide * attributes Show * attributes object
        • HostIp string

          Host IP address that the container's port is mapped to.

        • HostPort string

          Host port number that the container's port is mapped to.

    • RestartPolicy object

      The behavior to apply when the container exits. The default is not to restart.

      An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.

      Hide RestartPolicy attributes Show RestartPolicy attributes object
      • Name string
        • Empty string means not to restart
        • no Do not automatically restart
        • always Always restart
        • unless-stopped Restart always except when the user has manually stopped the container
        • on-failure Restart only when the container exit code is non-zero

        Values are , no, always, unless-stopped, or on-failure.

      • MaximumRetryCount integer

        If on-failure is used, the number of times to retry before giving up.

    • AutoRemove boolean

      Automatically remove the container when the container's process exits. This has no effect if RestartPolicy is set.

    • VolumeDriver string

      Driver that this container uses to mount volumes.

    • VolumesFrom array[string]

      A list of volumes to inherit from another container, specified in the form <container name>[:<ro|rw>].

    • Mounts array[object]

      Specification for mounts to be added to the container.

      Hide Mounts attributes Show Mounts attributes object
      • Target string

        Container path.

      • Source string

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

      • Type string

        The mount type. Available types:

        • bind Mounts a file or directory from the host into the container. Must exist prior to creating the container.
        • volume Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are not removed when the container is removed.
        • tmpfs Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
        • npipe Mounts a named pipe from the host into the container. Must exist prior to creating the container.
        • cluster a Swarm cluster volume

        Values are bind, volume, tmpfs, npipe, or cluster.

      • ReadOnly boolean

        Whether the mount should be read-only.

      • Consistency string

        The consistency requirement for the mount: default, consistent, cached, or delegated.

      • BindOptions object

        Optional configuration for the bind type.

        Hide BindOptions attributes Show BindOptions attributes object
        • Propagation string

          A propagation mode with the value [r]private, [r]shared, or [r]slave.

          Values are private, rprivate, shared, rshared, slave, or rslave.

        • NonRecursive boolean

          Disable recursive bind mount.

          Default value is false.

        • CreateMountpoint boolean

          Create mount point on host if missing

          Default value is false.

        • ReadOnlyNonRecursive boolean

          Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to true in conjunction).

          Default value is false.

        • ReadOnlyForceRecursive boolean

          Raise an error if the mount cannot be made recursively read-only.

          Default value is false.

      • VolumeOptions object

        Optional configuration for the volume type.

        Hide VolumeOptions attributes Show VolumeOptions attributes object
        • NoCopy boolean

          Populate volume with data from the target.

          Default value is false.

        • Labels object

          User-defined key/value metadata.

          Hide Labels attribute Show Labels attribute object
          • * string Additional properties
        • DriverConfig object

          Map of driver specific options

          Hide DriverConfig attributes Show DriverConfig attributes object
          • Name string

            Name of the driver to use to create the volume.

          • Options object

            key/value map of driver specific options.

            Hide Options attribute Show Options attribute object
            • * string Additional properties
      • TmpfsOptions object

        Optional configuration for the tmpfs type.

        Hide TmpfsOptions attributes Show TmpfsOptions attributes object
        • SizeBytes integer(int64)

          The size for the tmpfs mount in bytes.

        • Mode integer

          The permission mode for the tmpfs mount in an integer.

    • ConsoleSize array[integer]

      Initial console size, as an [height, width] array.

      At least 2 but not more than 2 elements. Minimum value of each is 0.

    • Annotations object

      Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started.

      Hide Annotations attribute Show Annotations attribute object
      • * string Additional properties
    • CapAdd array[string]

      A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'.

    • CapDrop array[string]

      A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'.

    • CgroupnsMode string

      cgroup namespace mode for the container. Possible values are:

      • "private": the container runs in its own private cgroup namespace
      • "host": use the host system's cgroup namespace

      If not specified, the daemon default is used, which can either be "private" or "host", depending on daemon version, kernel support and configuration.

      Values are private or host.

    • Dns array[string]

      A list of DNS servers for the container to use.

    • DnsOptions array[string]

      A list of DNS options.

    • DnsSearch array[string]

      A list of DNS search domains.

    • ExtraHosts array[string]

      A list of hostnames/IP mappings to add to the container's /etc/hosts file. Specified in the form ["hostname:IP"].

    • GroupAdd array[string]

      A list of additional groups that the container process will run as.

    • IpcMode string

      IPC sharing mode for the container. Possible values are:

      • "none": own private IPC namespace, with /dev/shm not mounted
      • "private": own private IPC namespace
      • "shareable": own private IPC namespace, with a possibility to share it with other containers
      • "container:<name|id>": join another (shareable) container's IPC namespace
      • "host": use the host system's IPC namespace

      If not specified, daemon default is used, which can either be "private" or "shareable", depending on daemon version and configuration.

    • Cgroup string

      Cgroup to use for the container.

    • OomScoreAdj integer

      An integer value containing the score given to the container in order to tune OOM killer preferences.

    • PidMode string

      Set the PID (Process) Namespace mode for the container. It can be either:

      • "container:<name|id>": joins another container's PID namespace
      • "host": use the host's PID namespace inside the container
    • Privileged boolean

      Gives the container full access to the host.

    • PublishAllPorts boolean

      Allocates an ephemeral host port for all of a container's exposed ports.

      Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container.

      The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by /proc/sys/net/ipv4/ip_local_port_range.

    • ReadonlyRootfs boolean

      Mount the container's root filesystem as read only.

    • SecurityOpt array[string]

      A list of string values to customize labels for MLS systems, such as SELinux.

    • StorageOpt object

      Storage driver options for this container, in the form {"size": "120G"}.

      Hide StorageOpt attribute Show StorageOpt attribute object
      • * string Additional properties
    • Tmpfs object

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

      { "/run": "rw,noexec,nosuid,size=65536k" }
      
      Hide Tmpfs attribute Show Tmpfs attribute object
      • * string Additional properties
    • UTSMode string

      UTS namespace to use for the container.

    • UsernsMode string

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

    • ShmSize integer(int64)

      Size of /dev/shm in bytes. If omitted, the system uses 64MB.

      Minimum value is 0.

    • Sysctls object

      A list of kernel parameters (sysctls) to set in the container. For example:

      {"net.ipv4.ip_forward": "1"}
      
      Hide Sysctls attribute Show Sysctls attribute object
      • * string Additional properties
    • Runtime string

      Runtime to use with this container.

    • Isolation string

      Isolation technology of the container. (Windows only)

      Values are default, process, or hyperv.

    • MaskedPaths array[string]

      The list of paths to be masked inside the container (this overrides the default set of paths).

    • ReadonlyPaths array[string]

      The list of paths to be set as read-only inside the container (this overrides the default set of paths).

  • NetworkingConfig object

    NetworkingConfig represents the container's networking configuration for each of its interfaces. It is used for the networking configs specified in the docker create and docker network connect commands.

    Hide NetworkingConfig attribute Show NetworkingConfig attribute object
    • EndpointsConfig object

      A mapping of network name to endpoint configuration for that network. The endpoint configuration can be left empty to connect to that network with no particular endpoint configuration.

      Hide EndpointsConfig attribute Show EndpointsConfig attribute object
      • * object Additional properties

        Configuration for a network endpoint.

        Hide * attributes Show * attributes object
        • IPAMConfig object

          EndpointIPAMConfig represents an endpoint's IPAM configuration.

          Hide IPAMConfig attributes Show IPAMConfig attributes object
          • IPv4Address string
          • IPv6Address string
          • LinkLocalIPs array[string]
        • MacAddress string

          MAC address for the endpoint on this network. The network driver might ignore this parameter.

        • Aliases array[string]
        • NetworkID string

          Unique ID of the network.

        • EndpointID string

          Unique ID for the service endpoint in a Sandbox.

        • Gateway string

          Gateway address for this network.

        • IPAddress string

          IPv4 address.

        • IPPrefixLen integer

          Mask length of the IPv4 address.

        • IPv6Gateway string

          IPv6 gateway address.

        • GlobalIPv6Address string

          Global IPv6 address.

        • GlobalIPv6PrefixLen integer(int64)

          Mask length of the global IPv6 address.

        • DriverOpts object

          DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific.

          Hide DriverOpts attribute Show DriverOpts attribute object
          • * string Additional properties
        • DNSNames array[string]

          List of all DNS names an endpoint has on a specific network. This list is based on the container name, network aliases, container short ID, and hostname.

          These DNS names are non-fully qualified but can contain several dots. You can get fully qualified DNS names by appending .<network-name>. For instance, if container name is my.ctr and the network is named testnet, DNSNames will contain my.ctr and the FQDN will be my.ctr.testnet.

Body Required

Container to create

  • Hostname string

    The hostname to use for the container, as a valid RFC 1123 hostname.

  • Domainname string

    The domain name to use for the container.

  • User string

    The user that commands are run as inside the container.

  • AttachStdin boolean

    Whether to attach to stdin.

    Default value is false.

  • AttachStdout boolean

    Whether to attach to stdout.

    Default value is true.

  • AttachStderr boolean

    Whether to attach to stderr.

    Default value is true.

  • ExposedPorts object

    An object mapping ports to an empty object in the form:

    {"<port>/<tcp|udp|sctp>": {}}

    Hide ExposedPorts attribute Show ExposedPorts attribute object
    • * object Additional properties

      Default value is {} (empty).

  • Tty boolean

    Attach standard streams to a TTY, including stdin if it is not closed.

    Default value is false.

  • OpenStdin boolean

    Open stdin

    Default value is false.

  • StdinOnce boolean

    Close stdin after one attached client disconnects

    Default value is false.

  • Env array[string]

    A list of environment variables to set inside the container in the form ["VAR=value", ...]. A variable without = is removed from the environment, rather than to have an empty value.

  • Cmd array[string]

    Command to run specified as a string or an array of strings.

  • Healthcheck object

    A test to perform to check that the container is healthy.

    Hide Healthcheck attributes Show Healthcheck attributes object
    • Test array[string]

      The test to perform. Possible values are:

      • [] inherit healthcheck from image or parent image
      • ["NONE"] disable healthcheck
      • ["CMD", args...] exec arguments directly
      • ["CMD-SHELL", command] run command with system's default shell
    • Interval integer(int64)

      The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

    • Timeout integer(int64)

      The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

    • Retries integer

      The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.

    • StartPeriod integer(int64)

      Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

    • StartInterval integer(int64)

      The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit.

  • ArgsEscaped boolean

    Command is already escaped (Windows only)

    Default value is false.

  • Image string

    The name (or reference) of the image to use when creating the container, or which was used when the container was created.

  • Volumes object

    An object mapping mount point paths inside the container to empty objects.

    Hide Volumes attribute Show Volumes attribute object
    • * object Additional properties

      Default value is {} (empty).

  • WorkingDir string

    The working directory for commands to run in.

  • Entrypoint array[string]

    The entry point for the container as a string or an array of strings.

    If the array consists of exactly one empty string ([""]) then the entry point is reset to system default (i.e., the entry point used by docker when there is no ENTRYPOINT instruction in the Dockerfile).

  • NetworkDisabled boolean

    Disable networking for the container.

  • MacAddress string

    MAC address of the container.

    Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead.

  • OnBuild array[string]

    ONBUILD metadata that were defined in the image's Dockerfile.

  • Labels object

    User-defined key/value metadata.

    Hide Labels attribute Show Labels attribute object
    • * string Additional properties
  • StopSignal string

    Signal to stop a container as a string or unsigned integer.

  • StopTimeout integer

    Timeout to stop a container in seconds.

    Default value is 10.

  • Shell array[string]

    Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

  • HostConfig object

    Container configuration that depends on the host we are running on

    Hide HostConfig attributes Show HostConfig attributes object
    • CpuShares integer

      An integer value representing this container's relative CPU weight versus other containers.

    • Memory integer(int64)

      Memory limit in bytes.

      Default value is 0.

    • CgroupParent string

      Path to cgroups under which the container's cgroup is created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups are created if they do not already exist.

    • BlkioWeight integer

      Block IO weight (relative weight).

      Minimum value is 0, maximum value is 1000.

    • BlkioWeightDevice array[object]

      Block IO weight (relative device weight) in the form:

      [{"Path": "device_path", "Weight": weight}]
      
      Hide BlkioWeightDevice attributes Show BlkioWeightDevice attributes object
      • Path string
      • Weight integer

        Minimum value is 0.

    • BlkioDeviceReadBps array[object]

      Limit read rate (bytes per second) from a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceReadBps attributes Show BlkioDeviceReadBps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • BlkioDeviceWriteBps array[object]

      Limit write rate (bytes per second) to a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceWriteBps attributes Show BlkioDeviceWriteBps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • BlkioDeviceReadIOps array[object]

      Limit read rate (IO per second) from a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceReadIOps attributes Show BlkioDeviceReadIOps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • BlkioDeviceWriteIOps array[object]

      Limit write rate (IO per second) to a device, in the form:

      [{"Path": "device_path", "Rate": rate}]
      
      Hide BlkioDeviceWriteIOps attributes Show BlkioDeviceWriteIOps attributes object
      • Path string

        Device path

      • Rate integer(int64)

        Rate

        Minimum value is 0.

    • CpuPeriod integer(int64)

      The length of a CPU period in microseconds.

    • CpuQuota integer(int64)

      Microseconds of CPU time that the container can get in a CPU period.

    • CpuRealtimePeriod integer(int64)

      The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.

    • CpuRealtimeRuntime integer(int64)

      The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.

    • CpusetCpus string

      CPUs in which to allow execution (e.g., 0-3, 0,1).

    • CpusetMems string

      Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.

    • Devices array[object]

      A list of devices to add to the container.

      A device mapping between the host and container

      Hide Devices attributes Show Devices attributes object
      • PathOnHost string
      • PathInContainer string
      • CgroupPermissions string
    • DeviceCgroupRules array[string]

      a list of cgroup rules to apply to the container

    • DeviceRequests array[object]

      A list of requests for devices to be sent to device drivers.

      A request for devices to be sent to device drivers

      Hide DeviceRequests attributes Show DeviceRequests attributes object
      • Driver string
      • Count integer
      • DeviceIDs array[string]
      • Capabilities array[array]

        A list of capabilities; an OR list of AND lists of capabilities.

      • Options object

        Driver-specific options, specified as a key/value pairs. These options are passed directly to the driver.

        Hide Options attribute Show Options attribute object
        • * string Additional properties
    • KernelMemoryTCP integer(int64)

      Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime.

      This field is omitted when empty.

    • MemoryReservation integer(int64)

      Memory soft limit in bytes.

    • MemorySwap integer(int64)

      Total memory limit (memory + swap). Set as -1 to enable unlimited swap.

    • MemorySwappiness integer(int64)

      Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.

      Minimum value is 0, maximum value is 100.

    • NanoCpus integer(int64)

      CPU quota in units of 10-9 CPUs.

    • OomKillDisable boolean

      Disable OOM Killer for the container.

    • Init boolean

      Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.

    • PidsLimit integer(int64)

      Tune a container's PIDs limit. Set 0 or -1 for unlimited, or null to not change.

    • Ulimits array[object]

      A list of resource limits to set in the container. For example:

      {"Name": "nofile", "Soft": 1024, "Hard": 2048}
      
      Hide Ulimits attributes Show Ulimits attributes object
      • Name string

        Name of ulimit

      • Soft integer

        Soft limit

      • Hard integer

        Hard limit

    • CpuCount integer(int64)

      The number of usable CPUs (Windows only).

      On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.

    • CpuPercent integer(int64)

      The usable percentage of the available CPUs (Windows only).

      On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.

    • IOMaximumIOps integer(int64)

      Maximum IOps for the container system drive (Windows only)

    • IOMaximumBandwidth integer(int64)

      Maximum IO in bytes per second for the container system drive (Windows only).

    • Binds array[string]

      A list of volume bindings for this container. Each volume binding is a string in one of these forms:

      • host-src:container-dest[:options] to bind-mount a host path into the container. Both host-src, and container-dest must be an absolute path.
      • volume-name:container-dest[:options] to bind-mount a volume managed by a volume driver into the container. container-dest must be an absolute path.

      options is an optional, comma-delimited list of:

      • nocopy disables automatic copying of data from the container path to the volume. The nocopy flag only applies to named volumes.
      • [ro|rw] mounts a volume read-only or read-write, respectively. If omitted or set to rw, volumes are mounted read-write.
      • [z|Z] applies SELinux labels to allow or deny multiple containers to read and write to the same volume.
        • z: a shared content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing.
        • Z: a private unshared label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container's processes from using the content. By default, the labels set by the host operating system are not modified.
      • [[r]shared|[r]slave|[r]private] specifies mount propagation behavior. This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to shared. For slave volumes, the mount must be set to either shared or slave.
    • ContainerIDFile string

      Path to a file where the container ID is written

    • LogConfig object

      The logging configuration for this container

      Hide LogConfig attributes Show LogConfig attributes object
      • Type string

        Values are json-file, syslog, journald, gelf, fluentd, awslogs, splunk, etwlogs, or none.

      • Config object
        Hide Config attribute Show Config attribute object
        • * string Additional properties
    • NetworkMode string

      Network mode to use for this container. Supported standard values are: bridge, host, none, and container:<name|id>. Any other value is taken as a custom network's name to which this container should connect to.

    • PortBindings object

      PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format <port>/<protocol>, for example, 80/udp.

      If a container's port is mapped for multiple protocols, separate entries are added to the mapping table.

      Hide PortBindings attribute Show PortBindings attribute object
      • * array[object] Additional properties

        PortBinding represents a binding between a host IP address and a host port.

        Hide * attributes Show * attributes object
        • HostIp string

          Host IP address that the container's port is mapped to.

        • HostPort string

          Host port number that the container's port is mapped to.

    • RestartPolicy object

      The behavior to apply when the container exits. The default is not to restart.

      An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.

      Hide RestartPolicy attributes Show RestartPolicy attributes object
      • Name string
        • Empty string means not to restart
        • no Do not automatically restart
        • always Always restart
        • unless-stopped Restart always except when the user has manually stopped the container
        • on-failure Restart only when the container exit code is non-zero

        Values are , no, always, unless-stopped, or on-failure.

      • MaximumRetryCount integer

        If on-failure is used, the number of times to retry before giving up.

    • AutoRemove boolean

      Automatically remove the container when the container's process exits. This has no effect if RestartPolicy is set.

    • VolumeDriver string

      Driver that this container uses to mount volumes.

    • VolumesFrom array[string]

      A list of volumes to inherit from another container, specified in the form <container name>[:<ro|rw>].

    • Mounts array[object]

      Specification for mounts to be added to the container.

      Hide Mounts attributes Show Mounts attributes object
      • Target string

        Container path.

      • Source string

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

      • Type string

        The mount type. Available types:

        • bind Mounts a file or directory from the host into the container. Must exist prior to creating the container.
        • volume Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are not removed when the container is removed.
        • tmpfs Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
        • npipe Mounts a named pipe from the host into the container. Must exist prior to creating the container.
        • cluster a Swarm cluster volume

        Values are bind, volume, tmpfs, npipe, or cluster.

      • ReadOnly boolean

        Whether the mount should be read-only.

      • Consistency string

        The consistency requirement for the mount: default, consistent, cached, or delegated.

      • BindOptions object

        Optional configuration for the bind type.

        Hide BindOptions attributes Show BindOptions attributes object
        • Propagation string

          A propagation mode with the value [r]private, [r]shared, or [r]slave.

          Values are private, rprivate, shared, rshared, slave, or rslave.

        • NonRecursive boolean

          Disable recursive bind mount.

          Default value is false.

        • CreateMountpoint boolean

          Create mount point on host if missing

          Default value is false.

        • ReadOnlyNonRecursive boolean

          Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to true in conjunction).

          Default value is false.

        • ReadOnlyForceRecursive boolean

          Raise an error if the mount cannot be made recursively read-only.

          Default value is false.

      • VolumeOptions object

        Optional configuration for the volume type.

        Hide VolumeOptions attributes Show VolumeOptions attributes object
        • NoCopy boolean

          Populate volume with data from the target.

          Default value is false.

        • Labels object

          User-defined key/value metadata.

          Hide Labels attribute Show Labels attribute object
          • * string Additional properties
        • DriverConfig object

          Map of driver specific options

          Hide DriverConfig attributes Show DriverConfig attributes object
          • Name string

            Name of the driver to use to create the volume.

          • Options object

            key/value map of driver specific options.

            Hide Options attribute Show Options attribute object
            • * string Additional properties
      • TmpfsOptions object

        Optional configuration for the tmpfs type.

        Hide TmpfsOptions attributes Show TmpfsOptions attributes object
        • SizeBytes integer(int64)

          The size for the tmpfs mount in bytes.

        • Mode integer

          The permission mode for the tmpfs mount in an integer.

    • ConsoleSize array[integer]

      Initial console size, as an [height, width] array.

      At least 2 but not more than 2 elements. Minimum value of each is 0.

    • Annotations object

      Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started.

      Hide Annotations attribute Show Annotations attribute object
      • * string Additional properties
    • CapAdd array[string]

      A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'.

    • CapDrop array[string]

      A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'.

    • CgroupnsMode string

      cgroup namespace mode for the container. Possible values are:

      • "private": the container runs in its own private cgroup namespace
      • "host": use the host system's cgroup namespace

      If not specified, the daemon default is used, which can either be "private" or "host", depending on daemon version, kernel support and configuration.

      Values are private or host.

    • Dns array[string]

      A list of DNS servers for the container to use.

    • DnsOptions array[string]

      A list of DNS options.

    • DnsSearch array[string]

      A list of DNS search domains.

    • ExtraHosts array[string]

      A list of hostnames/IP mappings to add to the container's /etc/hosts file. Specified in the form ["hostname:IP"].

    • GroupAdd array[string]

      A list of additional groups that the container process will run as.

    • IpcMode string

      IPC sharing mode for the container. Possible values are:

      • "none": own private IPC namespace, with /dev/shm not mounted
      • "private": own private IPC namespace
      • "shareable": own private IPC namespace, with a possibility to share it with other containers
      • "container:<name|id>": join another (shareable) container's IPC namespace
      • "host": use the host system's IPC namespace

      If not specified, daemon default is used, which can either be "private" or "shareable", depending on daemon version and configuration.

    • Cgroup string

      Cgroup to use for the container.

    • OomScoreAdj integer

      An integer value containing the score given to the container in order to tune OOM killer preferences.

    • PidMode string

      Set the PID (Process) Namespace mode for the container. It can be either:

      • "container:<name|id>": joins another container's PID namespace
      • "host": use the host's PID namespace inside the container
    • Privileged boolean

      Gives the container full access to the host.

    • PublishAllPorts boolean

      Allocates an ephemeral host port for all of a container's exposed ports.

      Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container.

      The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by /proc/sys/net/ipv4/ip_local_port_range.

    • ReadonlyRootfs boolean

      Mount the container's root filesystem as read only.

    • SecurityOpt array[string]

      A list of string values to customize labels for MLS systems, such as SELinux.

    • StorageOpt object

      Storage driver options for this container, in the form {"size": "120G"}.

      Hide StorageOpt attribute Show StorageOpt attribute object
      • * string Additional properties
    • Tmpfs object

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

      { "/run": "rw,noexec,nosuid,size=65536k" }
      
      Hide Tmpfs attribute Show Tmpfs attribute object
      • * string Additional properties
    • UTSMode string

      UTS namespace to use for the container.

    • UsernsMode string

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

    • ShmSize integer(int64)

      Size of /dev/shm in bytes. If omitted, the system uses 64MB.

      Minimum value is 0.

    • Sysctls object

      A list of kernel parameters (sysctls) to set in the container. For example:

      {"net.ipv4.ip_forward": "1"}
      
      Hide Sysctls attribute Show Sysctls attribute object
      • * string Additional properties
    • Runtime string

      Runtime to use with this container.

    • Isolation string

      Isolation technology of the container. (Windows only)

      Values are default, process, or hyperv.

    • MaskedPaths array[string]

      The list of paths to be masked inside the container (this overrides the default set of paths).

    • ReadonlyPaths array[string]

      The list of paths to be set as read-only inside the container (this overrides the default set of paths).

  • NetworkingConfig object

    NetworkingConfig represents the container's networking configuration for each of its interfaces. It is used for the networking configs specified in the docker create and docker network connect commands.

    Hide NetworkingConfig attribute Show NetworkingConfig attribute object
    • EndpointsConfig object

      A mapping of network name to endpoint configuration for that network. The endpoint configuration can be left empty to connect to that network with no particular endpoint configuration.

      Hide EndpointsConfig attribute Show EndpointsConfig attribute object
      • * object Additional properties

        Configuration for a network endpoint.

        Hide * attributes Show * attributes object
        • IPAMConfig object

          EndpointIPAMConfig represents an endpoint's IPAM configuration.

          Hide IPAMConfig attributes Show IPAMConfig attributes object
          • IPv4Address string
          • IPv6Address string
          • LinkLocalIPs array[string]
        • MacAddress string

          MAC address for the endpoint on this network. The network driver might ignore this parameter.

        • Aliases array[string]
        • NetworkID string

          Unique ID of the network.

        • EndpointID string

          Unique ID for the service endpoint in a Sandbox.

        • Gateway string

          Gateway address for this network.

        • IPAddress string

          IPv4 address.

        • IPPrefixLen integer

          Mask length of the IPv4 address.

        • IPv6Gateway string

          IPv6 gateway address.

        • GlobalIPv6Address string

          Global IPv6 address.

        • GlobalIPv6PrefixLen integer(int64)

          Mask length of the global IPv6 address.

        • DriverOpts object

          DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific.

          Hide DriverOpts attribute Show DriverOpts attribute object
          • * string Additional properties
        • DNSNames array[string]

          List of all DNS names an endpoint has on a specific network. This list is based on the container name, network aliases, container short ID, and hostname.

          These DNS names are non-fully qualified but can contain several dots. You can get fully qualified DNS names by appending .<network-name>. For instance, if container name is my.ctr and the network is named testnet, DNSNames will contain my.ctr and the FQDN will be my.ctr.testnet.

Responses

  • 201 application/json

    Container created successfully

    Hide response attributes Show response attributes object
    • Id string Required

      The ID of the created container

    • Warnings array[string] Required

      Warnings encountered when creating the container

  • 400 application/json

    bad parameter

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 404 application/json

    no such image

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 409 application/json

    conflict

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

POST /containers/create
curl \
 --request POST 'http://api.example.com/v1.44/containers/create' \
 --header "Content-Type: application/json" \
 --data '{"Cmd":["date"],"Env":["FOO=bar","BAZ=quux"],"Tty":false,"User":"","Image":"ubuntu","Labels":{"com.example.vendor":"Acme","com.example.license":"GPL","com.example.version":"1.0"},"Volumes":{"/volumes/data":{}},"Hostname":"","OpenStdin":false,"StdinOnce":false,"Domainname":"","Entrypoint":"","HostConfig":{"Dns":["8.8.8.8"],"Binds":["/tmp:/tmp"],"Links":["redis3:redis"],"CapAdd":["NET_ADMIN"],"Memory":0,"CapDrop":["MKNOD"],"Devices":[],"PidMode":"","ShmSize":67108864,"Ulimits":[{}],"CpuQuota":50000,"GroupAdd":["newgroup"],"NanoCpus":500000,"CpuPeriod":100000,"CpuShares":512,"DnsSearch":[""],"LogConfig":{"Type":"json-file","Config":{}},"PidsLimit":0,"AutoRemove":true,"CpuPercent":80,"CpusetCpus":"0,1","CpusetMems":"0,1","DnsOptions":[""],"MemorySwap":0,"Privileged":false,"StorageOpt":{},"BlkioWeight":300,"MaximumIOps":0,"NetworkMode":"bridge","OomScoreAdj":500,"SecurityOpt":[],"VolumesFrom":["parent","other:ro"],"CgroupParent":"","MaximumIOBps":0,"PortBindings":{"22/tcp":[{"HostPort":"11022"}]},"VolumeDriver":"","RestartPolicy":{"Name":"","MaximumRetryCount":0},"DeviceRequests":[{"Count":-1,"Driver":"nvidia","Options":{"property1":"string","property2":"string"},"DeviceIDs\"":["0","1","GPU-fef8089b-4820-abfc-e83e-94318197576e"],"Capabilities":[["gpu","nvidia","compute"]]}],"OomKillDisable":false,"ReadonlyRootfs":false,"PublishAllPorts":false,"MemorySwappiness":60,"BlkioWeightDevice":[{}],"CpuRealtimePeriod":1000000,"MemoryReservation":0,"BlkioDeviceReadBps":[{}],"CpuRealtimeRuntime":10000,"BlkioDeviceReadIOps":[{}],"BlkioDeviceWriteBps":[{}],"BlkioDeviceWriteIOps":[{}]},"MacAddress":"12:34:56:78:9a:bc","StopSignal":"SIGTERM","WorkingDir":"","AttachStdin":false,"StopTimeout":10,"AttachStderr":true,"AttachStdout":true,"ExposedPorts":{"22/tcp":{}},"NetworkDisabled":false,"NetworkingConfig":{"EndpointsConfig":{"database_nw":{},"isolated_nw":{"Links":["container_1","container_2"],"Aliases":["server_x","server_y"],"IPAMConfig":{"IPv4Address":"172.20.30.33","IPv6Address":"2001:db8:abcd::3033","LinkLocalIPs":["169.254.34.68","fe80::3468"]}}}}}'
curl \
 --request POST 'http://api.example.com/v1.44/containers/create' \
 --header "Content-Type: application/octet-stream"
Request examples
{
  "Cmd": [
    "date"
  ],
  "Env": [
    "FOO=bar",
    "BAZ=quux"
  ],
  "Tty": false,
  "User": "",
  "Image": "ubuntu",
  "Labels": {
    "com.example.vendor": "Acme",
    "com.example.license": "GPL",
    "com.example.version": "1.0"
  },
  "Volumes": {
    "/volumes/data": {}
  },
  "Hostname": "",
  "OpenStdin": false,
  "StdinOnce": false,
  "Domainname": "",
  "Entrypoint": "",
  "HostConfig": {
    "Dns": [
      "8.8.8.8"
    ],
    "Binds": [
      "/tmp:/tmp"
    ],
    "Links": [
      "redis3:redis"
    ],
    "CapAdd": [
      "NET_ADMIN"
    ],
    "Memory": 0,
    "CapDrop": [
      "MKNOD"
    ],
    "Devices": [],
    "PidMode": "",
    "ShmSize": 67108864,
    "Ulimits": [
      {}
    ],
    "CpuQuota": 50000,
    "GroupAdd": [
      "newgroup"
    ],
    "NanoCpus": 500000,
    "CpuPeriod": 100000,
    "CpuShares": 512,
    "DnsSearch": [
      ""
    ],
    "LogConfig": {
      "Type": "json-file",
      "Config": {}
    },
    "PidsLimit": 0,
    "AutoRemove": true,
    "CpuPercent": 80,
    "CpusetCpus": "0,1",
    "CpusetMems": "0,1",
    "DnsOptions": [
      ""
    ],
    "MemorySwap": 0,
    "Privileged": false,
    "StorageOpt": {},
    "BlkioWeight": 300,
    "MaximumIOps": 0,
    "NetworkMode": "bridge",
    "OomScoreAdj": 500,
    "SecurityOpt": [],
    "VolumesFrom": [
      "parent",
      "other:ro"
    ],
    "CgroupParent": "",
    "MaximumIOBps": 0,
    "PortBindings": {
      "22/tcp": [
        {
          "HostPort": "11022"
        }
      ]
    },
    "VolumeDriver": "",
    "RestartPolicy": {
      "Name": "",
      "MaximumRetryCount": 0
    },
    "DeviceRequests": [
      {
        "Count": -1,
        "Driver": "nvidia",
        "Options": {
          "property1": "string",
          "property2": "string"
        },
        "DeviceIDs\"": [
          "0",
          "1",
          "GPU-fef8089b-4820-abfc-e83e-94318197576e"
        ],
        "Capabilities": [
          [
            "gpu",
            "nvidia",
            "compute"
          ]
        ]
      }
    ],
    "OomKillDisable": false,
    "ReadonlyRootfs": false,
    "PublishAllPorts": false,
    "MemorySwappiness": 60,
    "BlkioWeightDevice": [
      {}
    ],
    "CpuRealtimePeriod": 1000000,
    "MemoryReservation": 0,
    "BlkioDeviceReadBps": [
      {}
    ],
    "CpuRealtimeRuntime": 10000,
    "BlkioDeviceReadIOps": [
      {}
    ],
    "BlkioDeviceWriteBps": [
      {}
    ],
    "BlkioDeviceWriteIOps": [
      {}
    ]
  },
  "MacAddress": "12:34:56:78:9a:bc",
  "StopSignal": "SIGTERM",
  "WorkingDir": "",
  "AttachStdin": false,
  "StopTimeout": 10,
  "AttachStderr": true,
  "AttachStdout": true,
  "ExposedPorts": {
    "22/tcp": {}
  },
  "NetworkDisabled": false,
  "NetworkingConfig": {
    "EndpointsConfig": {
      "database_nw": {},
      "isolated_nw": {
        "Links": [
          "container_1",
          "container_2"
        ],
        "Aliases": [
          "server_x",
          "server_y"
        ],
        "IPAMConfig": {
          "IPv4Address": "172.20.30.33",
          "IPv6Address": "2001:db8:abcd::3033",
          "LinkLocalIPs": [
            "169.254.34.68",
            "fe80::3468"
          ]
        }
      }
    }
  }
}
Response examples (201)
{
  "Id": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
  "Warnings": [
    "string"
  ]
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (404)
{
  "message": "No such image: c2ada9df5af8"
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (409)
{
  "message": "Something went wrong."
}
Response examples (409)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}