build | R Documentation |
A simple utility to quickly build a Docker image from a Dockerfile.
build(
dockerfile = here::here("Dockerfile"),
image_name = "tugboat",
tag = "latest",
platforms = c("linux/amd64", "linux/arm64"),
build_args = NULL,
build_context = here::here(),
push = FALSE,
dh_username = NULL,
dh_password = NULL
)
dockerfile |
The path to the Dockerfile. The default value
is a file named |
image_name |
A string specifying the Docker image name. Default
is |
tag |
A string specifying the image tag. Default is |
platforms |
A vector of strings. Which platforms to build images for.
Default is both |
build_args |
A vector of strings specifying additional build arguments
to pass to the |
build_context |
The directory that is the build context for the image(s). Default value is the directory returned by here::here. |
push |
A boolean indicating whether to push to DockerHub. |
dh_username |
A string specifying the DockerHub username. Only
necessary if |
dh_password |
A string specifying the DockerHub password. Only
necessary if |
The name of the built Docker image as a string.
## Not run:
dock <- create(
project = here::here(),
FROM = "rstudio/r-base:devel-bookworm",
exclude = c("/data", "/examples")
)
image_name <- build(
dockerfile = here::here("Dockerfile"),
image_name = "awesome_analysis",
push = TRUE,
dh_username = Sys.getenv("DH_USERNAME"),
dh_password = Sys.getenv("DH_PASSWORD")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.