Created
April 17, 2026 01:33
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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