Create a dockerignore template for raw data directories
Source: R/dockerignore-templates.R
dk_template_ignore_raw_data.RdCreates a dockerignore template with patterns to ignore common raw data
directories.
Details
This template adds patterns to ignore common raw data directories following
the usethis
and Cookiecutter Data Science conventions:
data-raw/data/raw/: Raw, immutable datadata/interim/: Intermediate data that has been transformeddata/processed/: The final, canonical data sets for modelingdata/external/: Data from third party sources
Raw data is often large and not needed in the Docker image. Instead, it's usually better to mount the data as a volume at runtime.
See also
dk_template_ignore_data() for ignoring data file formats,
dk_template_ignore_common() for a more comprehensive template,
Cookiecutter Data Science Directory Structure Overview, &
usethis::use_raw_data()
Other dockerignore template functions:
dk_template_ignore_common(),
dk_template_ignore_data(),
dk_template_ignore_editor(),
dk_template_ignore_git(),
dk_template_ignore_node(),
dk_template_ignore_os(),
dk_template_ignore_packrat(),
dk_template_ignore_python(),
dk_template_ignore_r(),
dk_template_ignore_renv()
Examples
# Create a new dockerignore with raw data patterns
di <- dk_template_ignore_raw_data()
# Add raw data patterns to an existing dockerignore
di <- dockerignore() |>
di_add("*.log") |>
dk_template_ignore_raw_data()