docker_build: Build image on an instance from a local Dockerfile

Description Usage Arguments Details Value See Also Examples

View source: R/harbor_gce.R

Description

Uploads a folder with a Dockerfile and supporting files to an instance and builds it

Usage

1
2
3
4
5
6
7
8
docker_build(
  host = localhost,
  dockerfolder,
  new_image,
  folder = "buildimage",
  wait = FALSE,
  ...
)

Arguments

host

A host object.

dockerfolder

Local location of build directory including valid Dockerfile

new_image

Name of the new image

folder

Where on host to build dockerfile

wait

Whether to block R console until finished build

...

Other arguments passed to the SSH command for the host

Details

Dockerfiles are best practice when creating your own docker images, rather than logging into a Docker container, making changes and committing.

Value

A table of active images on the instance

See Also

Best practices for writing Dockerfiles

An example Dockerfile for rOpensci

General R Docker images found at rocker-org

Examples

1
2
3
4
5
## Not run: 
docker_build(localhost, "/home/stuff/dockerfolder" ,"new_image", wait = TRUE)
docker_run(localhost, "new_image")

## End(Not run)

cloudyr/googleComputeEngineR documentation built on Jan. 23, 2022, 8:30 a.m.