3

this might seems a stupid question, but here I am : I'm running Ubuntu 16.04 and managed to install windows 10 in dual boot. Running docker exclusively in linux so far, I decided to give it a try on Windows 10.

As I already downloaded several docker images on my Linux system, I'm willing to have a "shared" like development environment. I must admit this would be a waste of time and disk space to download Docker images I already downloaded before (on linux) on my fresh windows install.

So my question is simple : Can I use my linux images / containers on windows. I'm thinking of something like a global path variable pointing to my linux images to configure on docker windows.

Any idea if this is possible, and if yes, the pros and cons and the caveats ? Thanks for helping me on this one.

Neovea
  • 504
  • 3
  • 17

2 Answers2

0

Well i would suggest to create your local registry and then push these images there and pull it in your windows docker.

Sonatype nexus(artifact storage repository) can be used to store your docker images. Check if this helps.

ProgrammerBoy
  • 876
  • 6
  • 19
0

I guess it's not possible to share the same folder (to reduce disk usage) since the stored files are totally different:

Under Windows the file is:

  • C:\Users\Public\Documents\Hyper-V\Virtual hard disks \MobyLinuxVM.vhdx

the vhdx extension is specific to MS systems.

and under linux it consist of 2 files:

  • /var/lib/docker/devicemapper/devicemapper/data
  • /var/lib/docker/devicemapper/devicemapper/metadata

see here for details Where are Docker images stored on the host machine?

The technology under this is to have a specific fileSystem optimal for docker. Even if they used the same fileSystem storage, it wouldn't be a good idea imho.

If the purpose is only to gain time for resintalling, just dump all the images from on system, and re-pull them on the other one.

docker images --format "{{.Repository}}" > image-list.txt

then loop on the other OS

 while read p; do
  docker pull $p
 done < image-listtxt
Community
  • 1
  • 1
pdem
  • 3,880
  • 1
  • 24
  • 38
  • Hi, yes actually the main purpose was to store my images on a shared drive not to download them again as it's starting to take some place on my HDD. I figured it out not playing docker on Windows, and only on Linux which is more convenient for this technology. Thanks by the way, you pointed out exactly what I suspected. – Neovea Apr 18 '17 at 16:19