Unable to switch to linux containers even though I believe our organisation is on a premium plan.

john.bradshaw's Avatar

john.bradshaw

17 Jun, 2019 11:28 AM

Hi,

I believe my organisation is on a premium plan, and therefore should be able to switch to linux containers on the Visual Studio 2017 image.
When I try I am shown the following messages:

Warning: failed to get default registry endpoint from daemon (error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default 
daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.). Using system default: https://index.docker.io/v1/
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/auth: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run 
elevated to connect. This error may also indicate that the docker daemon is not running.
docker : C:\Program Files\Docker\Docker\Resources\bin\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. 
In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
At line:4 char:1
+ docker run --rm -v "$(Get-Location):/src/" --network host -e VERSION= ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (C:\Program File...is not running.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError


See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'. docker : error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=dockerfile&labels=%7B%7D& memory=0&memswap=0&networkmode=default&rm=1&session=76e720ca7f8c74fb143933d5d73379221b0a6fa3c3c48e03f947f09fbe16ebad&shmsize=0&t=platformtestservice&target=&ulimits=null: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. At line:5 char:1 + docker build -t $imagename . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (error during co...is not running.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError


Command executed with exception: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=76e720ca7f8c74fb143933d5d73379221b0a6fa3c3c48e03f947f09fbe16ebad&shmsize=0&t=platformtestservice&target=&ulimits=null: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Any help would be appreciated,

Thanks,

John

  1. Support Staff 1 Posted by Ilya Finkelshte... on 17 Jun, 2019 07:12 PM

    Ilya Finkelshteyn's Avatar

    Hi John,

    Please use Windows Server 2019 image we recently introduced for builds like yours. It is enabled for your account. Usage examples are here.

    Please let us know how it goes.

    Ilya.

  2. 2 Posted by john.bradshaw on 20 Jun, 2019 06:41 AM

    john.bradshaw's Avatar

    Hi Ilya,

    That has helped, thanks. Am I right in thinking only the D:/ drive can be shared with docker? In my linux implementation I volumed the project directory, this doesn't seem to be so easy on windows.

    Thanks,

    John

  3. Support Staff 3 Posted by Ilya Finkelshte... on 20 Jun, 2019 05:42 PM

    Ilya Finkelshteyn's Avatar

    Try junction point. Something like this should work:

    icacls %APPVEYOR_BUILD_FOLDER% /grant everyone:f
    mklink /J D:\%APPVEYOR_PROJECT_SLUG%  %APPVEYOR_BUILD_FOLDER%
    docker-switch-linux
    docker run --rm -v D:/%APPVEYOR_PROJECT_SLUG%:/%APPVEYOR_PROJECT_SLUG% busybox ls /%APPVEYOR_PROJECT_SLUG%
    

    Here we create a folder on D:\ with the same name as your project URL slug and link it to your project folder on C:\. Then mount it to the Linux container (busybox in the sample). Note that share credentials are done with separate user (not appveyor under which build is running) you need to change ACLs if (see icacls in the sample) for the build folder.

  4. Support Staff 4 Posted by Ilya Finkelshte... on 20 Jun, 2019 05:44 PM

    Ilya Finkelshteyn's Avatar

    Update: sample is in CMD, but if you prefer PowerShell, just change environment variables notation to $env:variable_name

  5. 5 Posted by john.bradshaw on 21 Jun, 2019 08:16 AM

    john.bradshaw's Avatar

    Hi Ilya,
    I’ll try that
    Thanks again!

  6. 6 Posted by john.bradshaw on 21 Jun, 2019 08:28 AM

    john.bradshaw's Avatar

    That worked great. Thanks Ilya, although mklink needs to be run in CMD or replaced with New-Item with the SymbolicLink type for Powershell

  7. Support Staff 7 Posted by Ilya Finkelshte... on 21 Jun, 2019 05:58 PM

    Ilya Finkelshteyn's Avatar

    Thank you, another reminder for me not to advise anything without trying end-to-end :)

  8. Ilya Finkelshteyn closed this discussion on 21 Aug, 2019 09:01 PM.

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

Keyboard shortcuts

Generic

? 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