use_vignette_docker: Use vignette: Docker

View source: R/use_vignette_docker.R

use_vignette_dockerR Documentation

Use vignette: Docker

Description

Creates a vignette rmarkdown file demonstrates how to create a Docker/Singularity image from a container stored in Dockerhub.

Usage

use_vignette_docker(
  package = names(get_description()),
  docker_org = NULL,
  docker_registry = "ghcr.io",
  cont = construct_cont(cont = paste(docker_org, package, sep = "/"), default_registry =
    docker_registry)[[1]],
  title = "Docker/Singularity Containers",
  vignette_index_entry = "docker",
  save_dir = here::here(),
  path = file.path(save_dir, "vignettes", "docker.Rmd"),
  output = list(`BiocStyle::html_document` = list(md_extensions = "-autolink_bare_uris")),
  port_in = 8787,
  port_out = 8900,
  force_new = FALSE,
  show = FALSE,
  verbose = TRUE
)

Arguments

package

R package name.

docker_org

Docker registry organization name. Can simply be your registry username instead. If NULL, docker_org will be inferred as the R package's GitHub owner.

docker_registry

Docker container registry to push to. Options include:

"ghcr.io" :

GitHub Container Registry

"docker.io" :

DockerHub

cont

Which Docker container to use on each OS (NULL means no container will be used for that OS). See here for a list of all official Bioconductor Docker container versions.

title

Title of vignette.

vignette_index_entry

Index entry of the vignette, which is used when creating the navigation bar in the pkgdown site.

save_dir

Directory to save the file to.

path

Path to the file.

output

Vignette output style. Defaults to html_document.

port_in

Port number to route into the docker container. See the Docker docs for further details.

port_out

Port number to route out of docker container. See the Docker docs for further details.

force_new

If the file already exists, overwrite it (default: FALSE).

show

Print the contents of the file in the R console.

verbose

Print messages.

Value

Path to vignette file.

Examples

path <- use_vignette_docker(package = "mypackage",
                            docker_org = "neurogenomics",
                            ## use default save_dir in practice
                            save_dir = tempdir())

rworkflows documentation built on Sept. 23, 2024, 1:08 a.m.