`# repo2docker-tool
Barebones tool to convert repositories to Docker images and save as tar/SIF files.
# Build the Docker image (first time only, or use --build flag)
./repo2docker /path/to/repo
# Convert with custom output name
./repo2docker /path/to/repo --name my-image
# Convert and also create SIF file
./repo2docker /path/to/repo --name my-image --sif
# Specify custom output directory
./repo2docker /path/to/repo --name my-image --output /custom/pathThe ./repo2docker script is a convenience wrapper that handles Docker operations:
./repo2docker <repo_path> [OPTIONS]-n, --name NAME- Name for output files (without extension)-o, --output DIR- Output directory (default:./outnext to repo)-t, --tag TAG- Docker image tag (default:repo2docker-image:latest)--sif- Also produce a .sif file (requires --privileged)--build- Force rebuild Docker image-h, --help- Show help message
# Basic usage with local path
./repo2docker /path/to/repo
# With GitHub URL
./repo2docker https://github.com/user/repo --name my-image
# With custom name
./repo2docker /path/to/repo --name my-custom-image
# With SIF output
./repo2docker /path/to/repo --name my-image --sif
# GitHub URL with SIF output
./repo2docker https://github.com/user/repo --name my-image --sif
# Custom output directory
./repo2docker /path/to/repo --name my-image --output ~/outputsIf you prefer to use Docker directly:
docker build -t repo2docker-tool:latest --platform=linux/amd64 .
docker run --rm -it \
-v /path/to/repo:/work \
-v /path/to/output:/out \
-v /var/run/docker.sock:/var/run/docker.sock \
repo2docker-tool:latest /work --name my-image