vs-dockerfiles icon indicating copy to clipboard operation
vs-dockerfiles copied to clipboard

I cant build the container

Open FlorianRawer-Mahlo opened this issue 1 year ago • 1 comments

When i use the docker build -t buildtools2022native:latest -m 2GB . command given in the Readme file it only gets to Step 2/13 and says: buildtoolserror

FlorianRawer-Mahlo avatar Mar 27 '24 09:03 FlorianRawer-Mahlo

It looks like the path to the image is not correct; in Docker Hub, the following are available for dotnet-framework/sdk:

https://hub.docker.com/r/microsoft/dotnet-framework-sdk

image

gjunker avatar Sep 10 '24 15:09 gjunker

Is this the same issue as the following?

> docker build -t buildtools2022native:latest -m 2GB .
Sending build context to Docker daemon  6.656kB
Step 1/13 : ARG FROM_IMAGE=microsoft/dotnet-framework:3.5-sdk-windowsservercore-1709
Step 2/13 : FROM ${FROM_IMAGE}
manifest for microsoft/dotnet-framework:3.5-sdk-windowsservercore-1709 not found: manifest unknown: manifest unknown

I tried changing the FROM_IMAGE value to mcr.microsoft.com/dotnet/framework/sdk:4.8.1 and was able to get it to work (after enabling "Hyper-V" feature in Windows configuration):

-ARG FROM_IMAGE=microsoft/dotnet-framework:3.5-sdk-windowsservercore-1709
+#ARG FROM_IMAGE=microsoft/dotnet-framework:3.5-sdk-windowsservercore-1709
+ARG FROM_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8.1

... well, almost. It builds but encounters an error during start-up like this:

> docker run -itd buildtools2022native:latest cmd.exe
423f83925f6567f4c88dcd1ef215acdbb780b393025600bbc74e0ed04587bd4d
docker: Error response from daemon: container 423f83925f6567f4c88dcd1ef215acdbb780b393025600bbc74e0ed04587bd4d encountered an error during hcs::System::CreateProcess: "cmd /S /C C:\BuildTools\Common7\Tools\VsDevCmd.bat &&" cmd.exe: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF755DE015D: (caller: 00007FF755D84C97) Exception(2) tid(3c4) 80070002 The system cannot find the file specified.
    CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
 Provider: 00000000-0000-0000-0000-000000000000].

That seems like something that can be figured out though and perhaps is just an artifact of the base images being different (mcr.microsoft.com/dotnet/framework/sdk:4.8.1 vs. microsoft/dotnet-framework:3.5-sdk-windowsservercore-1709) or VS tools changing over the years...

jacobq avatar Dec 27 '24 23:12 jacobq