Adds a line to a dockerfile and updates its metadata based on the instruction.
This is an internal function used by the more specific dfi_* functions.
Details
This internal function handles:
Adding the instruction with proper formatting
Handling multi-line arguments with appropriate indentation
Updating metadata for special instructions like
FROM
For FROM instructions, it extracts and stores:
Base image name
Package manager
Operating system
R version (for
rocker/r-ver:versionimages)
See also
dfi_from() for adding a FROM instruction &
dfi_run() for adding a RUN instruction
Other dockerfile core functions:
check_dockerfile(),
dockerfile(),
is_dockerfile(),
print.dockerfile()