Title: | Dockerthis: run any CLI tool on a Linux Container |
---|---|
Description: | Dockerthis is an R package that simplifies the execution of command line tools within isolated Docker containers. |
Authors: | Lucio Rezende Queiroz [aut, cre] |
Maintainer: | Lucio Rezende Queiroz <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9006 |
Built: | 2024-11-03 06:06:43 UTC |
Source: | https://github.com/luciorq/dockerthis |
Built Docker Image given a Dockerfile.
docker_build_image( dockerfile_path, image_name, force = FALSE, platform_arg = NULL )
docker_build_image( dockerfile_path, image_name, force = FALSE, platform_arg = NULL )
dockerfile_path |
Chracter. Path to Dockerfile. |
image_name |
Character. Name of the Image to be created. |
force |
Logical. Should image be removed before new build. Default FALSE. |
platform_arg |
Character. Platform string to be used, by default it
will use the one configured by Docker, usually Linux with the same
CPU architecture the same as the system,
import options are |
Functions for interaction with Docker Images and Containers
docker_client_cmd()
is the main function to interact with the docker client.
docker_list_images()
return a data frame with all tagged images
available for to user.
docker_list_containers()
return a data frame with all containers and
their state.
docker_remove_image()
remove Docker image.
docker_remove_container()
remove Docker container.
docker_start_container()
start a stopped Docker container.
docker_stop_container()
stop a running Docker container.
docker_client_cmd(..., verbose = TRUE) docker_list_images() docker_list_containers() docker_remove_image(image_name) docker_remove_container(container_name) docker_stop_container(container_name) docker_start_container(container_name)
docker_client_cmd(..., verbose = TRUE) docker_list_images() docker_list_containers() docker_remove_image(image_name) docker_remove_container(container_name) docker_stop_container(container_name) docker_start_container(container_name)
... |
Character. Arguments to be passed to Docker CLI. |
verbose |
Logical. Should output from CLI be printed. Default: |
image_name |
Character. Name or ID of the Image. |
container_name |
Character. Name or ID of the Container. |
Run Command on a Running Docker Container
docker_exec(cmd, ..., container_name, verbose = TRUE)
docker_exec(cmd, ..., container_name, verbose = TRUE)
cmd |
Character. Command to run. |
... |
Character. Additional arguments passed to |
container_name |
Name of Docker Container. |
verbose |
Logical. Print execution output while running.
Default: |
Start a new container to run command line tools inside Linux containers using Docker Client CLI.
docker_run( cmd, ..., container_name, image_name, docker_args = NULL, mount_paths = NULL, verbose = TRUE )
docker_run( cmd, ..., container_name, image_name, docker_args = NULL, mount_paths = NULL, verbose = TRUE )
cmd |
Character. Command to run. |
... |
Character. Additional arguments passed to |
container_name |
Name of Docker Container. |
image_name |
Name of Container Image. |
docker_args |
Character vector. Arguments passed to |
mount_paths |
Character vector. Host paths to be mounted in container. |
verbose |
Logical. Print execution output while running.
Default: |
Test if Docker CLI is available on PATH.
is_docker_available()
is_docker_available()