Methods for working with docker networks. This object is $network within a docker_client object.

Details

Below is reference documentation for all methods for version '1.29' of the docker API - other versions are available. This documentation is automatically generated from docker's API schema, and so inaccuracies may exist between it and stevedore's interface (especially references to JSON objects). Please report any documentation that might be improved at https://github.com/richfitz/stevedore/issues

Methods

network_create

Create a network. Similar to the cli command docker network create.

Usage:

  network_create(name = NULL, check_duplicate = TRUE,
      driver = NULL, internal = NULL, attachable = NULL,
      ingress = NULL, ipam = NULL, enable_ipv6 = NULL,
      options = NULL, labels = NULL)

Arguments:

  • name: The network's name.

  • check_duplicate: Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions.

  • driver: Name of the network driver plugin to use.

  • internal: Restrict external access to the network.

  • attachable: Globally scoped network is manually attachable by regular containers from workers in swarm mode.

  • ingress: Ingress network is the network which provides the routing-mesh in swarm mode.

  • ipam: Optional custom IP scheme for the network.

  • enable_ipv6: Enable IPv6 on the network.

  • options: Network specific options to be used by the drivers.

  • labels: User-defined key/value metadata.

get

Get a network by name or id

Usage:

  get(id)

Arguments:

  • id: A scalar character with the network's name or id (abbreviations of the id are allowed and will be resolved by the docker daemon).

help

Display help for this object

Usage:

  help(help_type = getOption("help_type"))

Arguments:

  • help_type: Passed to utils::help, can be one of "text", "html" or "pdf" (or an abbreviation). By default it uses the value getOption("help_type") and should follow the same behaviour as other R help (e.g., using "?")

network_list

List networks. Similar to the cli command docker network ls.

Usage:

  network_list(filters = NULL)

Arguments:

  • filters: A named character vector of filters to process on the networks list. Available filters:

    • driver=<driver-name> Matches a network's driver.

    • id=<network-id> Matches all or part of a network ID.

    • label=<key> or label=<key>=<value> of a network label.

    • name=<network-name> Matches all or part of a network name.

    • scope=["swarm"|"global"|"local"] Filters networks by scope (swarm, global, or local).

    • type=["custom"|"builtin"] Filters networks by type. The custom keyword returns all user-defined networks.

network_prune

Delete unused networks. Similar to the cli command docker network prune.

Usage:

  network_prune(filters = NULL)

Arguments:

  • filters: Filters to process on the prune list, as a named character vector.

    • until=<timestamp> Prune networks created before this timestamp. The <timestamp> can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the daemon machine's time.

network_delete

Remove a network. Similar to the cli command docker network rm.

Usage:

  network_delete(id)

Arguments:

  • id: Network ID or name

See also

docker_network for information on network objects.