Skip to content

Instantly share code, notes, and snippets.

@devarops
Created April 17, 2026 01:33
Show Gist options
  • Select an option

  • Save devarops/c65ab44142c9776d5d26712e5a6a9022 to your computer and use it in GitHub Desktop.

Select an option

Save devarops/c65ab44142c9776d5d26712e5a6a9022 to your computer and use it in GitHub Desktop.
This script extracts a dataset from a versioned Docker image in a container registry and restores it to a local directory.
# Replace <DATASET_NAME> with the name of your dataset
DATASET="<DATASET_NAME>"
# Replace <SUBDIR> with the name of your local data subdirectory
SUBDIR="<LOCAL_DATA_SUBDIRECTORY>"
# Ensure output directory exists
mkdir --parents "data/${SUBDIR}"
# Create a temporary container from the image
docker create --name "${DATASET}_data_extract" "islasgeci/${DATASET}_data:latest"
# Copy data from container to host
docker cp "${DATASET}_data_extract":/data/. "data/${SUBDIR}"
# Remove temporary container
docker rm --force "${DATASET}_data_extract"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment