How to Export and Import Container Images Between Hosts

In this article, I’ll show you how to Import and Export a Container Image from one Container Host to another using the docker command line.

Moving Container Images from one Container host to another Is one of the most Important tasks you will need to know In order to manage Windows Containers.

Docker has made this process ready easy and robust which allow our Containers to be super portable (the purpose of Containers).

The Docker commands for this job are Docker SAVE and LOAD, the save Image will be saved as a .TAR file.

In my case, I have created an IIS Container Image with a static website I need to move to another host, the Container Image Is called ServerCoreIIS and I’ll use the command below to save to c:\Install folder on my Windows Container Host.

docker save servercoreiis -o C:\Install\IISServrCore.tar

Done, In my case, it took around 5- 10 minutes to export the container

To load it (Import) to a new host, I’ve copied it to and I’ll use the cmdlet below to load it.

docker load -i C:\install\IISServrCore.tar

Next, If I use docker images I’ll see my the Imported container

Please join our Facebook page at https://www.facebook.com/ntweekly/

Leave a Reply