Docker: Linux containers in Windows docker workers

randy's Avatar


30 Jan, 2019 02:17 PM

Our produce is a *WIndows* product that uses *Linux* containers. We'd love to test with Appveyor.

I see in that linux containers were going to be offered, but I still don't see documentation on this. There are also references at

Is this something Appveyor is going to be able to do? The last time I tried it was not possible, only WIndows containers were usable on Windows workers.

Showing page 2 out of 2. View the first page

  1. 31 Posted by randy on 24 Apr, 2019 06:42 PM

    randy's Avatar

    Thanks for the coaching. I can get annoyed when people don't read the whole thing as well.

    I'm not sure we'll be able to figure out how to adapt to not having the user directory shared, as that's the standard place for tempdir (which we share in tests), and just the natural place for everything.

    Would it be possible to put the user directory on D?

  2. 32 Posted by Ilya Finkelshte... on 24 Apr, 2019 08:11 PM

    Ilya Finkelshteyn's Avatar

    No worries :) Try this:

    icacls %TMP% /grant everyone:f
    mklink /J D:\user-tmp %TMP%
    docker run --rm -v D:/user-tmp:/user-tmp busybox ls /user-tmp
  3. 33 Posted by randy on 24 Apr, 2019 08:22 PM

    randy's Avatar

    I don't speak enough Windows in reality, but I think that's problematic because we use system-provided TMPDIR for tests, which is still going to be over on C: in the current situation right? So we'll be creating working repositories (in tests) in TMPDIR, and won't be able to mount them.

    I'm pretty sure that if the homedir were on D it would all work out, not sure.

    Alternately, if there's not a reason to avoid it, sharing C: would be natural and what most people would expect. Most people would expect both C: and D: (in this case) to be shared.

  4. 34 Posted by Ilya Finkelshte... on 24 Apr, 2019 08:38 PM

    Ilya Finkelshteyn's Avatar

    Yeah, we will consider sharing C as well. For now I still believe junction should work fro you. You can do mklink /J D:\<any_folder_on_D> <any_folder_on_C> and then use that D:\<any_folder_on_D> as a docker volume

    But because share credentials are done with separate user (not appveyor under which build is running) you might need to change ACLs if (see icacls in sample) if this folder happens to be inside the appveyor user folder.

  5. 35 Posted by randy on 24 Apr, 2019 09:17 PM

    randy's Avatar

    But... C:\Users\testbot>echo %TEMP% C:\Users\testbot\AppData\Local\Temp

    Doesn't that mean I'm going to end up creating directories in AppData\Local\Temp and not being able to mount them?

  6. 36 Posted by Ilya Finkelshte... on 24 Apr, 2019 09:22 PM

    Ilya Finkelshteyn's Avatar

    Please replace TMP with TEMP in the example I sent and try. I believe it should work for you.

  7. 37 Posted by randy on 30 Apr, 2019 04:46 PM

    randy's Avatar

    Just a note that I haven't been successful with this yet, but probably haven't given it enough effort. The simple changes suggested did not get things happening on the D: drive. I'm pretty sure that if you end up moving the homedir to D: things will be OK, and absolutely certain that if you share the C: drive it will be OK. Or give us the option to change the shares.

  8. 38 Posted by randy on 02 May, 2019 12:08 AM

    randy's Avatar

    I did some testing on a local WIndows 10 machine with 2 drives, and do not believe this strategy works. If you use mklink /J to create a shadow directory, Windows still knows where it really is, and docker still cares that the real thing isn't shared.

     Volume in drive F is New Volume
     Volume Serial Number is 84D6-41DB
     Directory of F:\Users
    05/01/2019  05:40 PM    <DIR>          .
    05/01/2019  05:40 PM    <DIR>          ..
    05/01/2019  05:40 PM    <JUNCTION>     rfay [c:\Users\rfay]
  9. 39 Posted by Ilya Finkelshte... on 02 May, 2019 01:44 AM

    Ilya Finkelshteyn's Avatar

    OK, here is the way we do this (admittedly quite hacky). I think you can figure out how to deal with C: the same way :)

  10. Ilya Finkelshteyn closed this discussion on 02 Jul, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac