docker_build: Build a Docker image from a local Dockerfile or a...

Description Usage Arguments Value

View source: R/utility-functions.R

Description

The method is implemented based on stevedore and includes some logging and defaults. If a Dockerfile object is given, it is saved as a Dockerfile to a temporary directory.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
docker_build(x, tag, ...)

## S3 method for class 'character'
docker_build(
  x,
  tag = strsplit(tempfile(pattern = "containerit_", tmpdir = ""), "/")[[1]][2],
  the_dockerfile = "Dockerfile",
  ...
)

## S3 method for class 'Dockerfile'
docker_build(
  x,
  tag = strsplit(tempfile(pattern = "containerit_test_", tmpdir = ""), "/")[[1]][2],
  use_workdir = FALSE,
  clean_up = TRUE,
  ...
)

Arguments

x

the path to a directory with a valid Dockerfile (i.e. the context), or a Dockerfile object

tag

Name of the new image to be created

...

Other arguments, passed to docker_client

the_dockerfile

Name of the Dockerfile, defaults to "Dockerfile"

use_workdir

if a Dockerfile object is given, this can set the context to the current working directory (if TRUE) or a temporary directory (default)

clean_up

if use_workdir, then delete the Dockerfile file in the working directory, otherwise remove the Dockerfile created as a temporary file

Value

The id of the image


o2r-project/containerit documentation built on June 28, 2021, 2:46 p.m.