Issue when installting visual studio Build tool into Windows container

Hi All,
I’m actually using the docker Engine for windows and not Docker Desktop as specified in the category field.
I’ve been trying to install visual studio Built Tools without success.

Docker Host:
Windows Server 2022

docker info

Client:Context:    default
Debug Mode: false
Plugins:  app: Docker App (Docker Inc., v0.9.1-beta3)  cluster: Manage Mirantis Container Cloud clusters (Mirantis Inc., v1.9.0)  registry: Manage Docker registries (Docker Inc., 0.1.0)

Server:
Containers: 8  Running: 1  Paused: 0  Stopped: 7
Images: 36
Server Version: 20.10.9
Storage Driver: windowsfilter  Windows:
Logging Driver: json-file
Plugins:  Volume: local  Network: ics internal l2bridge l2tunnel nat null overlay private transparent  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 20348 (20348.1.amd64fre.fe_release.210507-1500)
Operating System: Windows Server 2022 Standard Version 2009 (OS Build 20348.558)
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 15.91GiB
Name: S-BUILD
Docker Root Dir: C:\docker-data
Debug Mode: true  File Descriptors: -1  Goroutines: 40  System Time: 2022-08-18T14:14:01.3376988+02:00  EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:  127.0.0.0/8
Live Restore Enabled: false

Dockerfile Content:


FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022

SHELL ["powershell.exe", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV HTTPS_PROXY=http://Fw01.ki.lan:8080/ `    HTTP_PROXY=http://Fw01.ki.lan:8080/

RUN $url = 'https://aka.ms/vs/17/release/vs_buildtools.exe'; `    $sha256 = '7276A7355219F7988C480D198E23C2973BBB7AB971C4F0415C26CAB2955344E5'; `    Invoke-WebRequest -Uri $url  -Proxy http://Fw01.ki.lan:8080/ -OutFile "C:\vs_BuildTools.exe"; 

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

RUN `    # Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.    (start /w C:\vs_buildtools.exe --quiet --wait --norestart --nocache `        --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" `        --add Microsoft.VisualStudio.Workload.AzureBuildTools `        --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `        --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `        --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `        --remove Microsoft.VisualStudio.Component.Windows81SDK `        || IF "%ERRORLEVEL%"=="3010" EXIT 0) `    `    # Cleanup    && del /q C:\vs_buildtools.exe

# Define the entry point for the docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

Error message:
re-exec error: exit status 1: output: hcsshim::ImportLayer - failed failed in Win32: Das System kann den angegebenen Pfad nicht finden. (0x3)

Is && is valid in Powershell?. Even if it is, the whole entrypoint does not seem valid, since you can’t run multiple commands this way. The in entrypoint should be one command and its parameters. If you want to run multiple commands, you need to create one batch script or a powershell script and call your commands from there so you can use your script as an entrypoint.