We have a .net MVC web application we are trying to run in docker. The application creates PDF documents and requires HP Universal Printing PCL 6 driver be installed. See part of my Dockerfile below.
FROM microsoft/windowsservercore
SHELL ["powershell"]
RUN Install-WindowsFeature NET-Framework-45-ASPNET ; \
Install-WindowsFeature Web-Asp-Net45 ;\
Install-WindowsFeature Print-Server ;\
Install-WindowsFeature Web-Server;
COPY /printdrivers /Temp/PrintDrivers
RUN Start-Process -FilePath C:\\Temp\\PrintDrivers\\pcl6-x64-6.6.0.23029\\Install.exe -ArgumentList "/q","/dm", "/npf", "/h" -Wait; \
The command to install the print driver does not exit. If I remove the -Wait parameter the image is created but the app does not generate the pdf document as expected. Running the same command on Windows 10 and 2016 Server results in a successful installation.
There seem to be some issues with the print spooler in docker for windows.
https://github.com/moby/moby/issues/37124
https://stackoverflow.com/questions/41565459/windows-2016-docker-container-error
Running the following commands in my container results in a stopped Spooler service.
Set-Service spooler -StartupType Automatic
Start-Service spooler
Get-Service spooler
Get-Printer
I am new to docker and not sure if what we’re trying to do is possible, or if dockerising this application is a sensible approach. Any help would be appreciated.