May 22, 2021 Docker From entry to practice
If you want to export a mirror to a local file, you
docker save
command.
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu 14.04 c4ff7513909d 5 weeks ago 225.4 MB
...
$sudo docker save -o ubuntu_14.04.tar ubuntu:14.04
You
docker load
to import from an exported local file to a local mirror library, for example
$ sudo docker load --input ubuntu_14.04.tar
Or
$ sudo docker load < ubuntu_14.04.tar
This imports the mirror and its associated metadata information, including labels, and so on.