支持 Crystal Reports 的 Docker 容器 [英] Docker Container with support for Crystal Reports

查看:12
本文介绍了支持 Crystal Reports 的 Docker 容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个 Docker 映像来托管我的 asp.net MVC 应用程序,该应用程序依赖于 Crystal Reports.

I am trying create a Docker image to host my asp.net MVC app that has a dependency on Crystal Reports.

我的 dockerfile 看起来像这样

My dockerfile looks like this

FROM microsoft/iis

COPY ./bin/Release/Publish/ c:\inetpub\wwwroot

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

#install Crystal reports runtime
COPY Resources/Files/CRRuntime_64bit_13_0_21.msi . 
RUN powershell.exe -Command Start-Process CRRuntime_64bit_13_0_21.msi -ArgumentList '/quiet' -Wait

CRRuntime_64bit_13_0_21.msi 安装失败.我登录到我的容器并从 powershell 运行 msi 安装并生成了一个日志.它很长,但有两点很突出:

The installing of the CRRuntime_64bit_13_0_21.msi fails. I logged onto my container and ran the msi install from powershell and produced a log. Its very long but here are 2 things that stand out:

  1. 错误 1904.模块 C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win64_x64pageobjectmodel.dll 注册失败.HRESULT -2147024770.请联系您的支持人员.操作于 17:20:50 结束:InstallFinalize.返回值3.

  1. Error 1904. Module C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win64_x64pageobjectmodel.dll failed to register. HRESULT -2147024770. Contact your support personnel. Action ended 17:20:50: InstallFinalize. Return value 3.

动作于 17:23:56 结束:安装.返回值 3.MSI (s) (3C:54) [17:23:56:467]:产品:.NET Framework(64 位)的 SAP Crystal Reports 运行时引擎——安装操作失败.MSI (s) (3C:54) [17:23:56:467]:Windows Installer 安装了产品.产品名称:用于 .NET Framework(64 位)的 SAP Crystal Reports 运行时引擎.产品版本:13.0.21.2533.产品语言:1033.制造商:SAP.安装成功或错误状态:1603.

Action ended 17:23:56: INSTALL. Return value 3. MSI (s) (3C:54) [17:23:56:467]: Product: SAP Crystal Reports runtime engine for .NET Framework (64-bit) -- Installation operation failed. MSI (s) (3C:54) [17:23:56:467]: Windows Installer installed the product. Product Name: SAP Crystal Reports runtime engine for .NET Framework (64-bit). Product Version: 13.0.21.2533. Product Language: 1033. Manufacturer: SAP. Installation success or error status: 1603.

第一个错误似乎没有停止安装.

The first error does not seem to halt the install.

欢迎提出任何解决此问题的建议以及创建图像的替代方法.

Any suggestions for troubleshooting this are welcome as are alternative ways of creating the image.

另外,只是为了确认.该网站加载并运行良好.我只是无法使用任何需要 Crystal Reports 依赖项的功能.

Also, just to confirm. The website loads and runs fine. I just can't use any of the features that require the Crystal Reports dependency.

推荐答案

我将在 Peters 答案非常适合安装 Crystal Reports,我在从 Crystal Report 导出到 PDF 时遇到了另一个问题,即缺少字体.

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:	empCRRuntime_64bit_13_0_21.msi -ArgumentList '/quiet /l*v c:	empinstall64.log' -Wait

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

出于某种原因,Microsoft 从 1803 版到 1809 版中删除了很多字体.我只能假设减小操作系统映像的大小.

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

这篇关于支持 Crystal Reports 的 Docker 容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆