Skip to content

Instantly share code, notes, and snippets.

View devarops's full-sized avatar
🐙
Learning

Evaristo Rojas • GECI devarops

🐙
Learning
View GitHub Profile
@devarops
devarops / pre-push
Created May 6, 2026 04:35
.git/hooks/pre-push
#!/usr/bin/env bash
# pre-push hook to run checks before pushing
CONTAINER_NAME="${PWD##*/}_ci"
echo "=========================================="
echo "🚀 Running pre-push checks in Docker..."
echo "=========================================="
@devarops
devarops / unpackage_dataset_image.sh
Created April 17, 2026 01:33
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
@devarops
devarops / package_dataset_image.sh
Last active April 17, 2026 01:12
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