Explaining What is the difference between export and save
Published in · 2 min read · Feb 18, 2019
--
Sharing images while developing with docker becomes common. Here is an article about sharing images without any registry.
docker export is used to export the container’s file system into a tar file. it doesn’t export any volumes associated with it.
Let’s pull the ubuntu latest image from the docker hub and export it into a tar file.
// pull the image
docker pull ubuntu// list images
docker images// run the container of the image
docker run -it ubuntu//open another terminal while running the container// list containers
docker ps// export it to a tar file
docker export <containerid> ubuntulatest.tardocker export --output="ubuntulat.tar" <containerid>
Now, we can import or load this tar file where ever you need.