Helpful to quickly run an image locally or deploy it. See the GitHub Packages for Docker documentation for details. Forms a URL of the form docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION Notice how, different from Docker Hub, docker images on GitHub Packages have an IMAGE_NAME appended to the familiar OWNER/REPOSITORY pattern. These IMAGE_NAMEs are immutable (cannot be changed nor deleted) and must be unique per GitHub repository.

gh_pkgs_image_url(
  image_name = gh_pkgs_image_name(target = "runtime"),
  version = gh_pkgs_image_version(),
  repo_spec = gh_repo_spec()
)

gh_pkgs_image_name(target = c("buildtime", "runtime"))

gh_pkgs_image_version()

Arguments

image_name, version

Image name and version as strings. Defaults to muggle convention.

repo_spec

GitHub repo specification in this form: owner/repo. Users should stick to the default; manual entry is only used for testing.

target

Build target for multistage muggle builds. By convention, for a package foo, muggle would build a foo-buildtime and foo-runtime for the buildtime and runtime docker multistage build targets, respectively. A buildtime target will exist for all muggle projects, a runtime target only for projects with deployed runtimes such as a shiny app

Value

character string

Functions

  • gh_pkgs_image_name: Get the docker image name conventionally used in muggle projects

  • gh_pkgs_image_version: Get the sha of the latest git commit if on GitHub Actions, or the head reference (the branch or tag) otherwise (not recommended for reproducibility).

See also

Other compute environment functions: install_sysdeps(), lib_cache_path, use_onbuild_image()