Guidance on switching Docker to use Linux containers in Windows builds

ryan's Avatar

ryan

20 Jul, 2019 04:40 AM

I'm trying to build a docker image for a self-contained dotnet app to run on linux from a Windows build (using the Visual Studio 2017 image) which is required to build and deploy a local SQL Server instance that is used to build and test the app. The build fails to create the docker image with the following comment, which I understand to mean that it's trying to build a Windows image, not a Linux image:

no matching manifest for windows/amd64 in the manifest list entries

I've seen several threads asking a similar question, which seems to be answered here: https://help.appveyor.com/discussions/questions/33953-docker-linux-.... However, I tried both updating to Visual Studio 2019 and copying the script suggested at the bottom of that thread, but I get failed builds with output like the following:

Get-LocalUser : User DockerExchange was not found.
At C:\projects\***\docker-appveyor.psm1:7 char:5
+     Get-LocalUser -Name $deUsername | Set-LocalUser -Password $secDeP ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (DockerExchange:String) [Get-LocalUser], UserNotFoundException
    + FullyQualifiedErrorId : UserNotFound,Microsoft.PowerShell.Commands.GetLocalUserCommand
 
& : The term 'C:\Program Files\Docker\Docker\DockerCli.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path 
is correct and try again.
At C:\projects\***\docker-appveyor.psm1:8 char:7
+     & $env:ProgramFiles\Docker\Docker\DockerCli.exe -Start --testftw! ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Program File...r\DockerCli.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
& : The term 'C:\Program Files\Docker\Docker\DockerCli.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path 
is correct and try again.
At C:\projects\***\docker-appveyor.psm1:9 char:7
+     & $env:ProgramFiles\Docker\Docker\DockerCli.exe -Mount=D -Usernam ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Program File...r\DockerCli.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Is there updated guidance on this?

  1. 1 Posted by ryan on 20 Jul, 2019 07:30 PM

    ryan's Avatar

    I've tried the Visual Studio 2019 image, as well, but it doesn't have the DockerCli.exe and fails to successfully build F# projects with "C:\Program Files\dotnet\sdk\2.2.203\FSharp\Microsoft.FSharp.Targets(277,9): error MSB6006: "dotnet.exe" exited with code 1."

  2. Support Staff 2 Posted by Ilya Finkelshte... on 23 Jul, 2019 07:28 AM

    Ilya Finkelshteyn's Avatar

    Hi Ryan,

    Sorry for the miscommunication. Please use Windows Server 2019 (not Visual Studio 2019) image for this. This image is available per request, and it is enabled for your account now. Usage sample is here.

    Ilya.

  3. 3 Posted by ryan on 23 Jul, 2019 01:12 PM

    ryan's Avatar

    This worked great! Thank you for the help!

  4. ryan closed this discussion on 23 Jul, 2019 01:35 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