Methods for working with a particular docker task. Task objects
are returned by using $task$get to fetch an existing task
by name or id, or $tasks from a
docker_service object representing a docker service.
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
helpDisplay help for this object
Usage:
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 "?")
idReturn the tasks's id
Usage:
id()inspectReturn detailed information about this task
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 a task has been removed.
task_logsGet task logs. Get stdout and stderr logs from a task.
Note: This endpoint works only for services with the json-file or journald logging drivers.
Usage:
task_logs(details = NULL, follow = NULL, stdout = TRUE,
stderr = TRUE, since = NULL, timestamps = NULL,
tail = NULL, stream = stdout())Arguments:
details: Show task context and extra details provided to logs.
follow: Return the logs as a stream.
This will return a 101 HTTP response with a Connection: upgrade header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, hrefhttps://docs.docker.com/engine/api/1.29/#operation/ContainerAttachsee the documentation for the attach endpoint.
stdout: Return logs from stdout
stderr: Return logs from stderr
since: Only return logs since this time, as a UNIX timestamp
timestamps: Add timestamps to every log line
tail: Only return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines.
stream: The stream to send output to. Options here are (1) a connection object (e.g. stdout(), stderr() or a writable open file connection object, (2) a scalar character indicating a filename to write to, or (3) FALSE or NULL to disable any output.
reloadRefresh infomation on the task from the server, returning $inspect() invisibly.
Usage:
reload()serviceReturn parent service
Usage:
service()stateRetrieve task state (running, shutdown, etc). Richer information about task status is available as $inspect()$status
Usage:
state(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 task has been removed.
docker_task_collection for other
task management methods.