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)

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
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
Experimental: false
Insecure Registries:
Live Restore Enabled: false

Dockerfile Content:


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


RUN $url = ''; `    $sha256 = '7276A7355219F7988C480D198E23C2973BBB7AB971C4F0415C26CAB2955344E5'; `    Invoke-WebRequest -Uri $url  -Proxy -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.