Methods for working with a particular docker network. Network objects are returned by creating a docker network, or by using $network$get to fetch an existing network by name or id.

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_connect

Connect a container to a network. Similar to the cli command docker network connect.

Usage:

  network_connect(container = NULL, endpoint_config = NULL)

Arguments:

  • container: The ID or name of the container to connect to the network.

  • endpoint_config: Configuration for a network endpoint.

containers

Return containers connected to this network

Usage:

  containers(reload = TRUE)

Arguments:

  • reload: Logical scalar, indicating if the information should be refreshed from the daemon (usually what you want).

network_disconnect

Disconnect a container from a network. Similar to the cli command docker network disconnect.

Usage:

  network_disconnect(container = NULL, force = NULL)

Arguments:

  • container: The ID or name of the container to disconnect from the network.

  • force: Force the container to disconnect from the network.

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 "?")

id

Return the network's id

Usage:

  id()
inspect

Return detailed information about this network. Similar to the cli command docker network inspect.

Usage:

  inspect(reload = TRUE)

Arguments:

  • reload: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set to FALSE after an network has been removed.

name

Return name for this network

Usage:

  name(reload = TRUE)

Arguments:

  • reload: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set to FALSE after a network has been removed.

reload

Refresh infomation on the network from the server, returning $inspect() invisibly.

Usage:

  reload()
network_delete

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

Usage:

  network_delete()

See also

docker_network_collection for other network management methods.