Learn R Programming

outsider.base (version 0.1.4)

container-class: Docker container class and methods

Description

Return a list class that describes a Docker container. The resulting class object comes with a series of convenience methods for starting, stopping and interacting with a container.

Usage

container_init(pkgnm)

# S3 method for container start(x)

# S3 method for container halt(x)

# S3 method for container exec(x, ...)

# S3 method for container status(x)

# S3 method for container copy(x, send = NULL, rtrn = NULL)

# S3 method for container run(x, cmd, args)

Arguments

pkgnm

Package name

x

container

...

Arguments

send

Filepaths to send from host computer to container.

rtrn

Directory on host computer where returning files should be sent.

cmd

Command name, character

args

List or vector of arguments, character

Value

A list of class container with the following items:

pkgnm

Package name of the outsider module

prgrm

Command to be called in the container

cntnr

Unique Docker container name

img

Image ID

Details

All outsider modules have a working_dir/ in which generated files are created and initiation files must be for the program to use. Files must be sent to this working directory and then returned before and after the program has run.

If no send or rtrn specified, returns TRUE.

See Also

Other private-docker: docker_build(), docker_cmd(), docker_cp(), docker_img_rm(), docker_ps_count(), docker_pull()