containerit (version 0.6.0)

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

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

docker_build(x, tag, ...)

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

# S3 method for 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