A small CLI tool to pull Docker images (with proxy support), optionally retag them, and export them as tar files for offline environments.
- Pull multiple Docker images
- Temporary Docker daemon proxy support
- Mirror registry support (e.g. arvancloud)
- Automatic retagging to canonical image names
- Export images as
.tar(for offline transfer) - Safe (no prune / no destructive operations)
go build -o dockfetch ./cmd./dockfetch --image nginx:latest./dockfetch \
--image nginx:latest \
--image redis:7 \
--image postgres:16./dockfetch \
--image nginx \
--proxy http://127.0.0.1:7890./dockfetch \
--image nginx \
--save \
--output-dir ./exports./dockfetch \
--image docker.arvancloud.ir/nginx:latest \
--retag-mirror \
--save- ✔ Pulls from mirror
- ✔ Retags to nginx:latest
- ✔ Saves as tar
docker load -i nginx_latest.tar--image Docker image (repeatable)--proxy HTTP proxy for Docker daemon--https-proxy HTTPS proxy (optional)--no-proxy NO_PROXY value--save Export image to tar--output-dir Output directory--retag-mirror Retag mirror images--mirror-prefix Mirror prefix (repeatable)--keep-proxy Do not remove proxy after run--list-before Show images before--list-after Show images after
- what to pull
- how to tag
- where to save 3. Docker Layer (internal/docker)
- docker pull
- docker tag
- docker save
- docker images 4. Proxy Layer (internal/proxy)
- applies proxy before pull
- removes proxy after execution 5. Utils (internal/util)
- Thin main.go (orchestration only)
- Separation of concerns
- Plan → Execute pattern
- Safe defaults (no destructive commands)
- Extensible architecture
- Parallel image pulls
- Progress bars (Docker-like UI)
- Retry mechanism
- Compression (tar.gz)
- GUI interface
- Requires Docker installed
- Proxy changes affect Docker daemon (system-wide)
- Needs sudo for proxy operations