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.
More on Multi-stage builds, cache, tags and registries
Show a multi-stage Dockerfile for a Java Spring Boot app and explain what you gain.BeginnerCI rebuilds from scratch every run and takes 12 minutes. How do you bring it down?IntermediateYou tag every build `myapp:latest`. A rollback is requested. What happens?BeginnerHow do you promote an image from dev to prod registry without rebuilding?IntermediateDisk on the build server keeps filling up with images.BeginnerWhen do you use `--no-cache` and when is it a smell?Beginner