Skip to content

Instantly share code, notes, and snippets.

@devarops
Last active April 17, 2026 01:12
Show Gist options
  • Select an option

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

Select an option

Save devarops/cfaaebb783d274f1e7ffb5dba8f3590e to your computer and use it in GitHub Desktop.
This script packages a local dataset into a versioned Docker image and publishes it to a container registry.
# Replace <DATASET_NAME> with the name of your dataset
DATASET="<DATASET_NAME>"
# Start a temporary container to stage the data
docker run --detach --interactive --tty --name "${DATASET}_data_package" ubuntu:latest bash
# Copy local data into the container
docker cp data/. "${DATASET}_data_package":/data
# Snapshot container as an image
docker commit "${DATASET}_data_package" "islasgeci/${DATASET}_data:latest"
# Push image to registry
docker push "islasgeci/${DATASET}_data:latest"
# Remove temporary container
docker rm --force "${DATASET}_data_package"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment