Dockerfile - WindowsAdminCenter installation error with MSI during build process

47 views Asked by At

I'm playing around with Docker on Windows Server, and have been trying to create a Dockerfile for Windows Admin Centre. I've got around a few of the original issues that stopped the WAC MSI installing onto a docker image in the first place, but now I'm trying to create a Dockerfile and build an image the MSI is failing to install.

If I go into an interactive terminal with the main servercore image (mcr.microsoft.com/windows/servercore:ltsc2022), and can install WAC correctly using the following command -

start-process C:\Windows\System32\msiexec.exe -wait -argumentlist "/i C:\wac-install.msi /qn /L*v C:\log.txt SME_PORT=6516 SSL_CERTIFICATE_OPTION=generate SME_CONTAINER=true TRANSFORMS=C:\wac-transform.mst"

However when I move this to a Dockerfile and run a build, Docker builds the image correctly but when you connect to the container WAC hasn't installed, and the logs have the error "Error 1719. The Windows Installer Service could not be accessed.".

Here is the Dockerfile I've got -

#escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS WinAdminCenter
SHELL ["powershell"]
COPY wac-install.msi C:\
COPY wac-transform.mst C:\
RUN Start-Process 'msiexec.exe' -ArgumentList '/i', 'C:\wac-install.msi', '/qn', '/L*v C:\log.txt', 'SME_PORT=6516', 'SSL_CERTIFICATE_OPTION=generate', 'SME_CONTAINER=true', 'TRANSFORMS=C:\wac-transform.mst'
ENTRYPOINT ["powershell"]

Once the image has been built, I can go into an interactive session on the container and manually install WAC, and this works fine. It just doesn't install it during the docker build process. Is there a way to actually do this?


I've tried setting the build run USER to USER "NT Authority\System", but no difference.

Also tried re-registering the MSIExec command with the below -

RUN msiexec /unreg
RUN msiexec /regserver

And tried enabling the 'msiserver' service using the following, however I get access denied error messages for these -

RUN powershell -Command Set-Service -Name msiserver -StartupType Automatic
RUN powershell -Command Start-Service msiserver
0

There are 0 answers