Skip to contents

Reads a .dockerignore file from disk into a dockerignore object that can be manipulated programmatically.

Usage

read_dockerignore(file = ".dockerignore")

Arguments

file

Path to .dockerignore file (default: ".dockerignore")

Value

A dockerignore object containing the parsed patterns

Details

Empty lines and comments (lines starting with #) are filtered out.

See also

dockerignore() for creating a new dockerignore object & write_dockerignore() for writing a dockerignore to disk

Other dockerignore I/O functions: write_dockerignore()

Examples

if (FALSE) { # \dontrun{
# Read an existing .dockerignore file
di <- read_dockerignore()

# Add more patterns
di <- di_add(di, "*.tmp")
} # }