| docker_task {stevedore} | R Documentation |
Management commands for working with a particular docker task
Description
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.
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 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 toFALSEafter a task has been removed.
task_logsGet task logs. Get
stdoutandstderrlogs from a task.Note: This endpoint works only for services with the
json-fileorjournaldlogging 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
101HTTP response with aConnection: upgradeheader, 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 fromstdoutstderr: Return logs fromstderrsince: Only return logs since this time, as a UNIX timestamptimestamps: Add timestamps to every log linetail: Only return this number of log lines from the end of the logs. Specify as an integer orallto 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)FALSEorNULLto 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()$statusUsage:
state(reload = TRUE)
Arguments:
reload: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set toFALSEafter a task has been removed.
See Also
docker_task_collection for other
task management methods.