Skip to contents

Produces a Dockerfile RUN snippet that installs the system packages a plan needs. On apt platforms the output uses the standard apt-get update && apt-get install -y --no-install-recommends ... && rm -rf /var/lib/apt/lists/* pattern.

Usage

dockerfile(x, platform = NULL, missing_only = TRUE, ...)

Arguments

x

A sysreqr_plan or package vector.

platform

Platform specification accepted by resolve_platform().

missing_only

Whether to include only packages not known to be installed.

...

Passed to check_packages() when x is not a plan.

Value

A single Dockerfile snippet.

Examples

plan <- check_packages("xml2", platform = "ubuntu-22.04")
cat(dockerfile(plan))
#> RUN apt-get update && apt-get install -y --no-install-recommends \
#>     libxml2-dev \
#>     && rm -rf /var/lib/apt/lists/*