Interview Prep/Docker/Multi-stage builds, cache, tags and registries

What is the difference between `docker save`/`load` and `export`/`import`?

IntermediateScenarioMulti-stage builds, cache, tags and registries
Answer

Situation read → Moving images into an air-gapped network.

What I'd do → docker save -o app.tar app:1.8.2 then docker load -i app.tar on the target: preserves layers, tags and history. docker export dumps a container's flattened filesystem and docker import makes a single-layer image, losing metadata like ENTRYPOINT and ENV.

Why → Use save/load for images; export/import is for filesystem snapshots.

Interview tip → For air-gap, skopeo copy docker://... oci-archive: is cleaner and can verify digests.

All Docker questions Roadmap: Docker & containers

More on Multi-stage builds, cache, tags and registries