I'm having a hard time installing an msi via Dockerfile. My Dockerfile:
FROM microsoft/windowsservercore:latest
RUN mkdir C:\temp
RUN mkdir C:\temp\msis
COPY . "C:/temp/msis"
RUN powershell -version 5.0 -command { Start-process -Filepath "C:\temp\msis\mySetup.msi" -ArgumentList "/qn" -PassThru | Wait-Process}
When running docker build via:
docker build -t myTools .
I get the following error:
Step 7/7 : RUN powershell -version 5.0 -command { Start-process -Filepath "C:\temp\msis\mySetup.msi" -ArgumentList "/qn" -PassThru | Wait-Process}
---> Running in d6f9f65d96a9
'Wait-Process}' is not recognized as an internal or external command,operable program or batch file.
If I build the container without the RUN step, and attach myself via -it
to the running container and paste the command powershell -version 5.0 -command { Start-process -Filepath "C:\temp\msis\mySetup.msi" -ArgumentList "/qn" -PassThru | Wait-Process}
the MSI gets installed correctly.
Has anyone an idea this failure happens?
Thx