Distribution: Registries & Air Gaps
The Registry Is the Deployment Contract
CI produces images; environments consume them. The registry between them is the single source of truth - run your own in one command when needed:
$ docker run -d --name registry -p 5000:5000 registry:2
$ docker tag app:1.4 localhost:5000/app:1.4
$ docker push localhost:5000/app:1.4
$ curl http://localhost:5000/v2/_catalog # the registry HTTP API
(Production registries add TLS + auth: Harbor, ECR, GHCR, Artifactory…)
No network? Images still move. save/load turns an image into a portable tarball - the delivery mechanism for air-gapped sites, ships, factory floors:
$ docker save -o sensor-agent.tar sensor-agent:3.2 # sending side
$ docker load -i sensor-agent.tar # receiving side
save/load | export/import | |
|---|---|---|
| Operates on | images (all layers, tags, history) | a container's flattened filesystem |
| Use for | moving images between daemons | snapshotting a container as a new base |
Goal: Both halves are labs: Private Registry (run, tag, push, verify via the API) and Air-Gap Transfer (save → remove → load, proving the round trip).