diff options
Diffstat (limited to 'docs/api.md')
-rw-r--r-- | docs/api.md | 83 |
1 files changed, 4 insertions, 79 deletions
diff --git a/docs/api.md b/docs/api.md index eaa08a1..26dfe60 100644 --- a/docs/api.md +++ b/docs/api.md @@ -188,8 +188,7 @@ character, bytes are assumed as an intended unit. `volumes_from` and `dns` arguments raise [TypeError]( https://docs.python.org/3.4/library/exceptions.html#TypeError) exception if they are used against v1.10 and above of the Docker remote API. Those -arguments should be passed to `start()` instead, or as part of the `host_config` -dictionary. +arguments should be passed as part of the `host_config` dictionary. **Params**: @@ -715,83 +714,9 @@ Identical to the `docker search` command. Similar to the `docker start` command, but doesn't support attach options. Use `.logs()` to recover `stdout`/`stderr`. -`binds` allows to bind a directory in the host to the container. See [Using -volumes](volumes.md) for more information. - -`port_bindings` exposes container ports to the host. -See [Port bindings](port-bindings.md) for more information. - -`lxc_conf` allows to pass LXC configuration options using a dictionary. - -`privileged` starts the container in privileged mode. - -[Links](http://docs.docker.io/en/latest/use/working_with_links_names/) can be -specified with the `links` argument. They can either be specified as a -dictionary mapping name to alias or as a list of `(name, alias)` tuples. - -`dns` and `volumes_from` are only available if they are used with version v1.10 -of docker remote API. Otherwise they are ignored. - -`network_mode` is available since v1.11 and sets the Network mode for the -container ('bridge': creates a new network stack for the container on the -Docker bridge, 'none': no networking for this container, 'container:[name|id]': -reuses another container network stack), 'host': use the host network stack -inside the container. - -`restart_policy` is available since v1.2.0 and sets the RestartPolicy for how a -container should or should not be restarted on exit. By default the policy is -set to no meaning do not restart the container when it exits. The user may -specify the restart policy as a dictionary for example: -```python -{ - "MaximumRetryCount": 0, - "Name": "always" -} -``` - -For always restarting the container on exit or can specify to restart the -container to restart on failure and can limit number of restarts. For example: -```python -{ - "MaximumRetryCount": 5, - "Name": "on-failure" -} -``` - -`cap_add` and `cap_drop` are available since v1.2.0 and can be used to add or -drop certain capabilities. The user may specify the capabilities as an array -for example: -```python -[ - "SYS_ADMIN", - "MKNOD" -] -``` - -**Params**: - -* container (str): The container to start -* binds: Volumes to bind -* port_bindings (dict): Port bindings. See note above -* lxc_conf (dict): LXC config -* publish_all_ports (bool): Whether to publish all ports to the host -* links (dict or list of tuples): See note above -* privileged (bool): Give extended privileges to this container -* dns (list): Set custom DNS servers -* dns_search (list): DNS search domains -* volumes_from (str or list): List of container names or Ids to get volumes -from. Optionally a single string joining container id's with commas -* network_mode (str): One of `['bridge', None, 'container:<name|id>', -'host']` -* restart_policy (dict): See note above. "Name" param must be one of -`['on-failure', 'always']` -* cap_add (list of str): See note above -* cap_drop (list of str): See note above -* extra_hosts (dict): custom host-to-IP mappings (host:ip) -* pid_mode (str): if set to "host", use the host PID namespace inside the - container -* security_opt (list): A list of string values to customize labels for MLS systems, such as SELinux. -* ulimits (list): A list of dicts or `docker.utils.Ulimit` objects. +**Deprecation warning:** For API version > 1.15, it is highly recommended to + provide host config options in the + [`host_config` parameter of `create_container`](#create_container) ```python >>> from docker import Client |