| docker_service {stevedore} | R Documentation |
Management commands for working with a particular docker service
Description
Methods for working with a particular docker service. Service
objects are returned by creating a docker service, or by using
$service$get to fetch an existing service 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
helpDisplay help for this object
Usage:
help(help_type = getOption("help_type"))Arguments:
help_type: Passed toutils::help, can be one of "text", "html" or "pdf" (or an abbreviation). By default it uses the valuegetOption("help_type")and should follow the same behaviour as other R help (e.g., using "?")
idReturn the services's id
Usage:
id()
inspectReturn detailed information about this service. Similar to the cli command
docker service inspect.Usage:
inspect(reload = TRUE)
Arguments:
reload: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set toFALSEafter a service has been removed.
nameReturn the service's name
Usage:
name(reload = TRUE)
Arguments:
reload: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set toFALSEafter a service has been removed.
psGet summary information about a service. Similar to the cli command
docker service ps.Usage:
ps(resolve_names = TRUE, filters = NULL)
Arguments:
resolve_names: Resolve task and node names, from their ids? IfFALSE, rather than do this instead only print ids. Task "names" are constructed from a combination of service name (or id) and the replicate number.filters: A named character vector of filters to process on the tasks list. Available filters are the same as$task$list(), except thatserviceis not accepted (it is used internally by this method). Useful filters includedesired-state,label,node,nameandid.
reloadRefresh infomation on the service from the server, returning
$inspect()invisibly.Usage:
reload()
service_deleteDelete a service. Similar to the cli command
docker service rm.Usage:
service_delete()
tasksFetch tasks associated with this service. Returns a list of
docker_taskobjectsUsage:
tasks(filters = NULL)
Arguments:
filters: A named character vector of filters to process on the tasks list. Available filters are the same as$task$list(), except thatserviceis not accepted (it is used internally by this method). Useful filters includedesired-state,label,node,nameandid.
versionReturn the service's version. This is used by some other methods to avoid conflicting writes.
Usage:
version(reload = TRUE)
Arguments:
reload: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set toFALSEafter a service has been removed.
See Also
docker_service_collection for other
service management methods.