powershell - Docker build for Matlab Compiler Runtime on Windows (non-interactive installation) -


i notice steps in docker build takes more time manually executing same command in container. provide context, process of installing matlab compiler runtime (mcr) follows:

  1. download mcr installer mathworks website
  2. unpack installation files
  3. run /bin/win64/setup.exe -mode silent -agreetolicense yes (non-interactive install)

i created following dockerfile set mcr on microsoft windowsservercore image including dotnet-framework.

# line 1: use dotnet-framework base image microsoft/dotnet-framework  # line 2: download mcr installer (self-extracting executable) , save zip file add https://www.mathworks.com/supportfiles/downloads/r2014b/deployment_files/r2014b/installers/win64/mcr_r2014b_win64_installer.exe c:\\mcr_r2014b_win64_installer.zip  # line 3: use powershell shell ["powershell", "-command", "$erroractionpreference = 'stop'; $progresspreference = 'silentlycontinue';"]  # line 4: unpack zip contents installation folder run expand-archive c:\\mcr_r2014b_win64_installer.zip -destinationpath c:\\mcr_installer  # line 5: run setup command 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 , installation folder after setup complete run remove-item -force -recurse c:\\mcr_installer, c:\\mcr_r2014b_win64_installer.zip 

i build new image using command:

docker build -t analytics/dotnet-mcr --no-cache --force-rm . 

the installation of mcr slow, when compared stopping @ line 4 , manually running mcr setup container based on ensuing image (using exact same powershell command)... reason why needs 3-4 minutes when performing same step via dockerfile based build?

note: best practices suggest using download utility versus using add, don't have constraints related image size since removing intermediate images deleting downloaded installer , unpacked installation folder. plus, seeing cleaner download progress bar of add command.

i appreciate improvements/optimizations may suggested.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -