How to Export and Import Windows Containers

In this blog post, I’ll show you how to Import and Export Windows Containers between hosts.

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 the process straightforward 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 saved Image will be saved as a .TAR file.

Docker

Docker provides an additional layer of abstraction and automation of operating-system-level virtualization on Windows and Linux.

Get Started

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

Windows Containers

First released on Windows Server 2016 TP5 with full Docker Engine Integrated.

The Installation process Is done from PowerShell using the Docker and Windows Containers Module and takes a few minutes.

Windows Containers is ideal for Front End Services with data that doesn’t change (Web Servers, etc).

Leave a Reply

Your email address will not be published. Required fields are marked *