- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
We want to build our Intel Fortran and C++ software with help of Windows Docker Containers for a more flexible software delivery approach. This is how far we have gotten:
- Build a Windows container with MSBuildTools 2022 or 2019 in it with the Dockerfile:
# escape=`
# Use the latest Windows Server 2022 image.
FROM mcr.microsoft.com/windows/server:ltsc2022
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
RUN `
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/16/release/vs_buildtools.exe `
`
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
&& (start /w vs_buildtools.exe --quiet --wait --noUpdateInstaller --norestart --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" `
--add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended;includeOptional `
--add Microsoft.VisualStudio.Workload.MSBuildTools;includeRecommended;includeOptional `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64;includeRecommended;includeOptional `
--add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended;includeOptional `
--add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended;includeOptional `
--add Microsoft.VisualStudio.Workload.MSBuildTools;includeRecommended;includeOptional `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
--add Microsoft.VisualStudio.Component.Windows10SDK.18362 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
--remove Microsoft.VisualStudio.Component.Windows81SDK `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
`
# Cleanup
&& del /q vs_buildtools.exe
# Enable long pathnames
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"]
RUN reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d 1 /f
# Define the entry point for the docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
This can lead to a Docker image with name msbuildtools2019server:latest. To install intel (in our case basekit and hpckit 2024 on them, we use the Dockerfile:
# Use the latest test image containing the Build Tools bootstrapper.
FROM msbuildtools2022server:latest
# Copy the Intel toolkits and script from the build context to the container's C:\ directory
ADD w_BaseKit_p_2024.1.0.595_offline.exe C:/
ADD w_HPCKit_p_2024.1.0.561_offline.exe C:/
ADD script.cmd C:/
# Install the Intel toolkits
RUN Start-Process -FilePath "C:\w_BaseKit_p_2024.1.0.595_offline.exe" -ArgumentList "--silent", "-l", "w_BaseKit_log.txt", "-a", "--action", "install", "--eula=accept", "-s", \
"--components", "intel.oneapi.win.dpcpp_ct.common:intel.oneapi.win.dpl:intel.oneapi.win.tbb.devel:intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.dal.devel:intel.oneapi.win.ipp.devel:intel.oneapi.win.mkl.devel" -Wait
RUN Start-Process -FilePath "C:\w_HPCKit_p_2024.1.0.561_offline.exe" -ArgumentList "--silent", "-l", "w_HPCKit_log.txt", "-a", "--action", "install", "--eula=accept", "-s" -Wait
# Delete executables
RUN powershell -Command "Remove-Item C:\*.exe"
# Define the entrypoint
ENTRYPOINT ["cmd.exe", "/C", "C:\\script.cmd", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
where we use a script.cmd file as entrypoint:
"C:\\Program Files (x86)\\Intel\\oneAPI\\setvars.bat" >nul 2>&1 && "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat"
After this we have a (albeit very large) docker image with which you can reach ifx.exe or ifort.exe from the prompt in the container.
Although this is hopeful, I think the integration between intel here and the MSBuild Tools isn't correctly done here. Questions are:
- Is a setup as we described above (so building in a Windows container with Intel 2024) doable, or do you have some pointers.
- Can you re-integrate Intel 2024 with MSBuildTools via the commandline (recall, in a Windows Docker Container you cannot click repair or something like that).
- What is happening during integration on file and registry level (if I know that, I probably can bake this in the dockerfile) ?
- Can you crosscompile with the intel compilers on Linux (I have seen you have docker images with the intel compilers) to a Windows (10 or 11) target ?
- Any more pointers ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Willem, we have sent you a private message. Kindly check your community inbox.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Willem, unfortunately, we were unable to hear back from you.
If you have any further queries, please post a new question, as this thread will no longer be monitored by Intel®.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page