Parses a Dockerfile from disk into a dockerfile
object that can be
manipulated programmatically.
Details
The function handles line continuations and extracts metadata like the base image, package manager, OS, and R version (if applicable). Comments and empty lines are skipped.
See also
dockerfile()
for creating a new dockerfile object &
write_dockerfile()
for writing a dockerfile to disk
Other dockerfile I/O functions:
write_dockerfile()
Examples
if (FALSE) { # \dontrun{
# Read an existing Dockerfile
df <- read_dockerfile("path/to/Dockerfile")
# Modify it
df <- dfi_run(df, "apt-get update")
df
} # }