I’m trying to make an image with a windows container with some pre-installed programs that my .NET app needs in order to work.
I copied all the EXE files into the container successfully but was unable to install them using the CMD as a shell or Powershell as a shell with the Start-Process
command.
When I’m running these commands within the container it outputs nothing, and when I’m running it using the RUN
command inside the Dockerfile in just hang on the command.
There’s any way to install EXE programs on a windows container?
2
Answers
Start-Process should work in your container.
For reference, here is a working Dockerfile for installing Java 11 into a Windows container:
Here are a few changes to try:
/qn
argument after the -ArgumentList flag. The final RUN statement should look more like this –USER ContainerAdministrator
statement is not needed. That is already the Docker default.In addition to the comment above, I have a things:
docker run -it --entrypoint mcr.microsoft.com/windows/servercore:ltsc2022
(orltsc2019
on a Windows Server 2019/Windows 10)