Installing msi on a docker container
I've done similar work 2 years ago, dockerizing some C# code we had in our organisation.
Here's a snippet from one of the Dockerfile that should help you achieve what you are trying to do -
FROM microsoft/windowsservercoreSHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]#Copy installersRUN (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/B/4/A/B4A8422F-C564-4393-80DA-6865A8C4B32D/MicrosoftAzureAuthoringTools-x64.msi', 'c:\tools\MicrosoftAzureAuthoringTools-x64.msi') ;\ (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/B/4/A/B4A8422F-C564-4393-80DA-6865A8C4B32D/MicrosoftAzureLibsForNet-x64.msi', 'c:\tools\MicrosoftAzureLibsForNet-x64.msi') ;\ Start-Process 'msiexec' -ArgumentList '/i c:\tools\MicrosoftAzureAuthoringTools-x64.msi /quiet /qn /norestart /log c:\tools\installAuth.log'; \ Start-Sleep -s 30 ;\ Start-Process 'msiexec' -ArgumentList '/i c:\tools\MicrosoftAzureLibsForNet-x64.msi /quiet /qn /norestart /log c:\tools\installLib.log';\ Start-Sleep -s 30 ;\ Remove-Item c:\tools\*.msi -force
My example downloads the files from the internet, then installs it from the c:\tools
folder to which they were downloaded to, but it should work just as well and also eliminates dependency on files existing on the host machine.
Hope it helps.