Installing Crystal report inside a docker image

I am trying to install the CR runtime in a docker image but getting errors. Tried using the cmd in the image with the same steps, it gives error. Also, running the same steps using a cmd in a local windows system installs the CR successfully. Below are the steps.

  1. “C:\setup\vc_redist_2022.exe” /quiet /norestart /log “C:\setup\vc_install.log”
    “C:\setup\vc_redist_x64.exe” /quiet /norestart /log “C:\setup\vc_install.log”
    “C:\setup\vcredist_x64.exe” /quiet /norestart /log “C:\setup\vc_install.log”
    “C:\setup\vcredist_x64_1.exe” /quiet /norestart /log “C:\setup\vc_install.log”
  2. type “C:\setup\vc_install.log”
  3. regsvr32.exe /s C:\Windows\SysWOW64\oledlg.dll
  4. regsvr32.exe /s C:\Windows\SysWOW64\msvcp140.dll
  5. regsvr32.exe /s C:\Windows\SysWOW64\vcruntime140.dll
  6. sc config W3SVC start= disabled
    net stop W3SVC
  7. msiexec /i “C:\setup\CRRuntime.msi” /quiet /norestart /log “C:\setup\cr_install.log”
  8. type “C:\setup\cr_install.log”
  9. sc config W3SVC start= auto
    net start W3SVC

Step number 7 is installing the CR, and step 8 is giving me the error in the logs.
CR Runtime version: 13.0.38.5404

Error Message: CustomAction +pageobjectmodel.dll.3A9D2E22.089E.41EE.8696.6BE8C981E0DD returned actual error code -2147024770 (note this
may not be 100% accurate if translation happened inside sandbox)
MSI (s) (3C:3C) [23:25:30:591]: Product: SAP Crystal Reports runtime engine for .NET Framework (64-bit) – Error 1904. M
odule C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enter
prise XI 4.0\win64_x64\pageobjectmodel.dll failed to register. HRESULT -2147024770. Contact your support personnel.

Error 1904. Module C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP Business
Objects Enterprise XI 4.0\win64_x64\pageobjectmodel.dll failed to register. HRESULT -2147024770. Contact your support
personnel.
Action ended 23:25:30: InstallFinalize. Return value 3.

Below are the steps of the docker:

# Use Windows Server Core with .NET Framework 4.8
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019

# Create setup directory
RUN mkdir C:\setup

# Copy Crystal Reports Runtime (x64) MSI and other dependencies
COPY setup1/CRRuntime.msi C:/setup/
COPY setup1/oledlg.dll C:/Windows/SysWOW64/
COPY setup1/msvcp140.dll C:/Windows/SysWOW64/
COPY setup1/vcruntime140.dll C:/Windows/SysWOW64/
COPY setup1/Fonts/arial.ttf C:/Windows/Fonts/
COPY setup1/Fonts/times.ttf C:/Windows/Fonts/
COPY setup1/vc_redist_2022.exe C:/setup/
COPY setup1/vc_redist_x64.exe C:/setup/
COPY setup1/vcredist_x64.exe C:/setup/
COPY setup1/vcredist_x64_1.exe C:/setup/

# Disable IIS temporarily to avoid file lock issues
RUN powershell -Command "Stop-Service W3SVC; Set-Service W3SVC -StartupType Disabled"

# Install Crystal Reports Runtime and Visual C++ Redistributables
RUN powershell -Command " \
    Start-Process 'C:\\setup\\vc_redist_2022.exe' -ArgumentList '/quiet','/norestart' -Wait; \
    Start-Process 'C:\\setup\\vc_redist_x64.exe' -ArgumentList '/quiet','/norestart' -Wait; \
    Start-Process 'C:\\setup\\vcredist_x64.exe' -ArgumentList '/quiet','/norestart' -Wait; \
    Start-Process 'C:\\setup\\vcredist_x64_1.exe' -ArgumentList '/quiet','/norestart' -Wait; \
"
RUN powershell -Command " \
    Start-Process 'C:\\Windows\\SysWOW64\\regsvr32.exe' -ArgumentList '/s','C:\\Windows\\SysWOW64\\oledlg.dll' -Wait;"

    RUN powershell -Command " \
    Start-Process 'C:\\Windows\\SysWOW64\\regsvr32.exe' -ArgumentList '/s','C:\\Windows\\SysWOW64\\msvcp140.dll' -Wait;"

    RUN powershell -Command " \
    Start-Process 'C:\\Windows\\SysWOW64\\regsvr32.exe' -ArgumentList '/s','C:\\Windows\\SysWOW64\\vcruntime140.dll' -Wait;"

# 🔑 Install Crystal with elevated rights
RUN powershell -Command "Start-Process msiexec.exe -ArgumentList '/i','C:\\setup\\CRRuntime.msi','/quiet','/norestart','/log','C:\\setup\\cr_install.log' -Wait"

# Re-enable and restart IIS
RUN powershell -Command "Set-Service W3SVC -StartupType Auto"


# Optional: Registry fix (only if you have a .reg file that is needed)
COPY setup1/crystal-registry.reg C:/setup/
RUN reg import C:\setup\crystal-registry.reg

COPY setup1/crystal.reg C:/setup/
RUN reg import C:\setup\crystal.reg

# Set working directory to IIS root
WORKDIR /inetpub/wwwroot

# Copy published Web API build output
COPY bin/ .

# Copy referenced DLLs to bin folder
COPY setup1/references/*.dll /inetpub/wwwroot/bin/

# Expose HTTP port
EXPOSE 80

Did you forget sharing the logs or error message? You menitoned it multiple times, but I don’t see it. If you share, please, use code blocks. I also edited your first post to make it readable. Here is our formatting guide for future posts:

I have added the error message in the post. Thanks.

But the app you want to install may not suppot running in a container.

If it is an SAP product , you could try to contact them. Or you could also try the Microsoft forum as it is about DLLs.

At this point I don’t know what the error message actually means, I don’t know the application and I don’t see how it could be solved by Docker. But if you have any more information that points to a Docker issue, like a documentation that says it should work in Docker, feel free to share and ask for more help.

I would like to know if docker supports the installation of Crystal Report Runtime (CR Runtime version: 13.0.38.5404) in the image? I am only getting the error in the image, while running the same commands in a windows system installs the runtime smoothly.

Docker doesn’t verify ever application that could be run with it. It’s better to ask the application provider if it can run inside Docker.

A container is a small, isolated environment. You will not have all the libraries, configuration files in a container that you would have on the a regular system. What you have in the container is baded on the image from which you created it. So an application developer has to support these special environments and make sure they install the required dependencies or make some extra configuration or at least document what you need to do in order to run in in a container.

One thing I can say is that Windows containers don’t support GUI. Not because of Docker. It is how Microsoft implmented Windows containers as far as I know. Docker just uses the images to help you create a container.