Node server to pull and save Docker images with platform and registry auth support
4.2K
A lightweight Node.js HTTP service that lets clients pull, save, and download Docker images on demand.
It supports:
linux/amd64, linux/arm64, etc.).tar downloadsThis service is ideal for CI pipelines, air‑gapped deployments, offline registries, or tooling that needs to export Docker images programmatically.
Uses docker pull with optional --platform.
Uses docker save and streams the result directly to the client.
Supports:
-v /var/run/docker.sock:/var/run/docker.sock
| Variable | Default | Description |
|---|---|---|
HOST | 0.0.0.0 | Interface to bind the HTTP server |
PORT | 3000 | Port to listen on |
CORS | * | CORS Allowed Origins |
Downloads a Docker image as a .tar file.
| Name | Required | Description |
|---|---|---|
image | yes | Image name, e.g. alpine:latest |
platform | no | Docker platform, e.g. linux/arm64 |
registry | no | Registry hostname for login |
username | no | Registry username |
password | no | Registry password |
curl -O -J "http://localhost:3000/download?image=alpine:latest"
curl -O -J "http://localhost:3000/download?image=nginx:latest&platform=linux/arm64"
curl -O -J \
"http://localhost:3000/download?image=myregistry.com/app:1.2.3&platform=linux/amd64®istry=myregistry.com&username=alice&password=secret"
Install dependencies:
npm install
Start the server:
HOST=127.0.0.1 PORT=3000 node server.js
Pull latest image:
docker pull sharevb/docker-image-download-server:latest
Run it with access to the host Docker daemon:
docker run \
-p 3000:3000 \
-v /var/run/docker.sock:/var/run/docker.sock \
sharevb/docker-image-download-server:latest
MIT
Content type
Image
Digest
sha256:d1a5ffa50…
Size
131.9 MB
Last updated
4 days ago
docker pull sharevb/docker-image-download-server:adbd7b9c35065713a40181c670fde90fa99d562c