我正在尝试在docker中安装mcr,以便可以在PC中运行其他mcr。 首先创建我的docker文件:
# Line 1: Use dotnet-framework base image
FROM microsoft/dotnet-framework
# Line 2: Download MCR installer (self-extracting executable) and save as ZIP file
ADD https://www.mathworks.com/supportfiles/downloads/R2018b/deployment_files/R2018b/installers/win64/MCR_R2018b_win64_installer.exe C:\\MCR_R2018b_win64_installer.zip
# Line 3: Use PowerShell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Line 4: Unpack ZIP contents to installation folder
RUN Expand-Archive C:\\MCR_R2018b_win64_installer.zip -DestinationPath C:\\MCR_INSTALLER
# Line 5: Run the setup command for a non-interactive installation of MCR
RUN Start-Process C:\MCR_INSTALLER\bin\win64\setup.exe -ArgumentList '-mode silent', '-agreeToLicense yes' -Wait
# Line 6: Remove ZIP and installation folder after setup is complete
RUN Remove-Item -Force -Recurse C:\\MCR_INSTALLER,C:\\MCR_R2018b_win64_installer.zip
然后,我构建我的docker映像[PowerShell]
docker build -t testing -f ./DockerFile.txt .
然后,在那之后,我运行exe文件(在GUI中),但是出现错误。
docker run testing myapplication.exe
我是Docker的新手,有人可以帮助我吗?