Low Orbit Flux Logo 2 D

Docker How To Export An Image

Exporting a Docker image is easy. We are going to cover the commands you need to do this today.

You can use these commands to import, export, save, and load docker images.

docker export export container to tarball archive stream
docker import create image from tarball, excludes history ( smaller image )
docker load load an image from tarball, includes history ( larger image )
docker save save image to tar archive stream ( includes parent layers )

Here are some examples showing how each of these would work.

docker load < my-image.tar.gz
docker save my_image:my_tag | gzip > my-image.tar.gz
cat my-container.tar.gz | docker import - my-image:my_tag
docker export my-container | gzip > my-container.tar.gz

You can tag images and upload them to Docker Hub like this:

docker login
docker tag 7d9495d03763 loworbitflux/smelly-hippo:latest
docker push loworbitflux/smelly-hippo