Docker Container with support for Crystal Reports

Using the full Windows 2019 container\windows:1809 as a base, the installer works, which hints that it's just down to missing OS components.

I don't get the 'Error 1904' logged but maybe I'm on a different host OS.

The installer log shows that a custom action SetASPDotNetDllPath is failing.

If you:

  • Open the installer MSI (e.g. in Orca)
  • Locate and extract the action binary, save as dll
  • Inspect its imports (e.g. with dumpbin)

This shows a dependency on oledlg.dll. This is its only dependency which isn't available in Server Core.

Its not great, but you can copy this version from the full windows container to fix it:

FROM as dll_source
FROM microsoft/iis

#hack in oledlg dll!!
COPY --from=dll_source /windows/system32/oledlg.dll /windows/system32/oledlg.dll 
COPY --from=dll_source /windows/syswow64/oledlg.dll /windows/syswow64/oledlg.dll 

RUN ["powershell.exe", "Install-WindowsFeature NET-Framework-45-ASPNET"]  
RUN ["powershell.exe", "Install-WindowsFeature Web-Asp-Net45"]

WORKDIR c:/temp
COPY CRRuntime_64bit_13_0_21.msi . 
RUN powershell.exe -Command Start-Process c:\temp\CRRuntime_64bit_13_0_21.msi -ArgumentList '/l*v c:\temp\install.log' -Wait

I'm going to add an additional answer while Peters answer worked perfectly for installing Crystal Reports, I had an additional issue with missing Fonts when exporting to PDF from Crystal Report.

This is what I've ended up with. The key is the change in the image tag name to be an older version.

#windowsservercore-1803 required as it has the fonts we need in the report in order to export to PDF
FROM microsoft/iis:windowsservercore-1803

#install features we need
RUN ["powershell.exe", "Install-WindowsFeature NET-Framework-45-ASPNET"]
RUN ["powershell.exe", "Install-WindowsFeature Web-Asp-Net45"]

#hack in oledlg dll so that Crystal Runtime will install
COPY Resources/Files/64/oledlg.dll /windows/syswow64/oledlg.dll
COPY Resources/Files/32/oledlg.dll /windows/system32/oledlg.dll

#copy in Crystal MSI and install. Note it's 64bit version
WORKDIR c:/temp
COPY Resources/Files/CRRuntime_64bit_13_0_21.msi .
RUN powershell.exe -Command Start-Process c:\temp\CRRuntime_64bit_13_0_21.msi -ArgumentList '/quiet /l*v c:\temp\install64.log' -Wait

#Add website files
COPY ./bin/Release/Publish/ /inetpub/wwwroot

For some reason Microsoft have dropped lots of fonts from version 1803 to 1809. I can only assume to reduce the OS image size.