【Docker】Save images and containers locally, load images and containers from local

Commands for saving and loading images:

docker save imageID > filename
docker load < filename

Images saved through the image command will save the operation history and can be rolled back to previous versions.

Commands for saving and loading containers:

docker export containID > filename
docker import filename [newname]

Images saved through containers will not save the operation history, so the file size is smaller.
If you want to run an image loaded through a container, you need to add relevant commands when running.

For example, if I load an Ubuntu system image through a container, the command to run it is:

docker run -it ubuntu:container /bin/bash

This will enter the terminal of the Ubuntu system.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.