Skip to contents

Creates a `dockerignore“ template with patterns to ignore common data files and directories.

Usage

dk_template_ignore_data(.dockerignore = NULL, raw = TRUE)

Arguments

.dockerignore

Optional existing dockerignore object to add patterns to

raw

Include raw data directories (default: TRUE)

Value

A dockerignore object with data-related ignore patterns

Details

This template adds patterns to ignore common data files and directories that are often large and can significantly slow down Docker builds. It includes patterns for various data file formats:

  • data/: Data directories

  • *.csv, *.tsv: CSV and TSV files

  • *.xls*: Excel files

  • *.db, *.sqlite*: Database files

  • *.h5, *.hdf5: HDF5 files

  • *.parquet, *.feather: Columnar storage formats

  • *.json: JSON files

  • *.pickle: Python pickle files

  • *.rdata, *.rda: R data files

If raw = TRUE, it also ignores common data directories:

  • data-raw/, data/raw/: Raw data

  • data/interim/: Intermediate processed data

  • data/processed/: Final processed data

  • data/external/: Data from external sources

Examples

# Create a new dockerignore with data patterns
di <- dk_template_ignore_data()

# Exclude raw data directories
di <- dk_template_ignore_data(raw = FALSE)