Get up and running with Harpoon (hpn) in minutes.
# Download the latest release for your platform
curl -L https://github.com/your-org/harpoon/releases/latest/download/hpn-linux-amd64 -o hpn
chmod +x hpn
sudo mv hpn /usr/local/bin/git clone https://github.com/your-org/harpoon.git
cd harpoon
make build
sudo cp dist/hpn /usr/local/bin/hpn --versionCreate an image list file:
echo "nginx:latest" > images.txt
echo "alpine:3.18" >> images.txtPull images:
hpn pull -f images.txtSave images to tar files:
# Save to default directory (./images)
hpn save -f images.txt
# Save to custom directory
hpn save -f images.txt --path ./output/imagesLoad images from tar files:
# Load from default directory (./images)
hpn load
# Load from custom directory
hpn load --path ./images
# Load recursively from subdirectories
hpn load --path ./images --recursiveThree modes:
# List images in local runtime (docker/podman/nerdctl)
hpn ls
# List saved tar files in path (IMAGE, SIZE, CHECKSUM)
hpn ls --path ./images
# Check images.txt against runtime or path
hpn ls -f images.txt
hpn ls -f images.txt --path ./imagesPush images to a registry:
# Preserve original paths
hpn push -f images.txt --registry harbor.company.com
# Push with unified project namespace
hpn push -f images.txt --registry harbor.company.com --project productionYou can pass extra flags to the underlying runtime (docker/podman/nerdctl/skopeo) after --, e.g. hpn pull -f images.txt -- --tls-verify=false.
Login to a container registry:
# Interactive login (most secure)
hpn login harbor.company.com
# Login with credentials
hpn login harbor.company.com -u admin -p password
# Login from stdin (for CI/CD)
echo "password" | hpn login harbor.company.com -u admin --password-stdinmkdir -p ~/.hpn
cat > ~/.hpn/config.yaml << EOF
registry: harbor.company.com
project: production
runtime:
preferred: docker
auto_fallback: true
paths:
save_path: ./images
load_path: ./images
EOFexport HPN_REGISTRY=harbor.company.com
export HPN_PROJECT=production
export HPN_RUNTIME_PREFERRED=docker# Pull development images
hpn pull -f dev-images.txt
# Save for offline use
hpn save -f dev-images.txt --path ./images
# Load on another machine
hpn load --path ./images# Build and push in CI
hpn --auto-fallback push -f production-images.txt --registry harbor.company.com --project production# Migrate from Docker Hub to private registry
hpn push -f dockerhub-images.txt --registry harbor.company.com --project productionhpn pull -f images.txt
# Automatically detects and uses available runtime# Use Docker
hpn --runtime docker pull -f images.txt
# Use Podman
hpn --runtime podman pull -f images.txt
# Auto-fallback mode
hpn --auto-fallback pull -f images.txtRuntime not found:
Error: no container runtime foundSolution: Install Docker, Podman, or Nerdctl
Permission denied:
Error: permission deniedSolution: Add user to docker group or use sudo
Registry authentication:
Error: authentication failedSolution: Login to registry first
hpn login harbor.company.com
# Or use the native runtime command
docker login harbor.company.com# Show help
hpn --help
# Show version
hpn --version
# Show detailed version
hpn version- Read the User Guide for detailed usage
- Check Configuration Guide for advanced settings
- See Examples for real-world scenarios
- Review Troubleshooting for common issues