mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
56 lines
No EOL
2.2 KiB
Docker
56 lines
No EOL
2.2 KiB
Docker
# escape=`
|
|
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
|
|
|
|
# Restore the default Windows shell for correct batch processing.
|
|
SHELL ["cmd", "/S", "/C"]
|
|
|
|
# Download the Build Tools bootstrapper.
|
|
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
|
|
|
|
# Install Build Tools.
|
|
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
|
|
--installPath C:\BuildTools `
|
|
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `
|
|
--add Microsoft.VisualStudio.Component.VC.ATLMFC `
|
|
--add Microsoft.VisualStudio.Component.Windows10SDK.18362 `
|
|
--add Microsoft.VisualStudio.Component.Windows10SDK.17763 `
|
|
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
|
|
--add Microsoft.VisualStudio.Component.VC.v141.x86.x64 `
|
|
--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
|
|
|
|
|
|
SHELL [ "powershell" ]
|
|
|
|
RUN Set-ExecutionPolicy Unrestricted -Force
|
|
|
|
# Install Chocolatey
|
|
RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
|
|
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
|
|
# Restore the default Windows shell for correct batch processing.
|
|
SHELL ["cmd", "/S", "/C"]
|
|
|
|
# Install prerequisites
|
|
RUN choco install conan -y
|
|
RUN choco install winflexbison -y
|
|
RUN choco install openssl -y
|
|
RUN choco install python -y
|
|
# Can't install a proper msys2 because it caused console hanging in the container during docker build.
|
|
RUN choco install msysgit -y
|
|
RUN choco install sed -y
|
|
|
|
# Set working environment.
|
|
RUN setx /M PATH "%PATH%;C:\\Program Files\\Git\\bin"
|
|
RUN mkdir C:\build
|
|
WORKDIR C:\build
|
|
|
|
# Configure conan
|
|
ADD default C:\Users\ContainerAdministrator\.conan\profiles\default
|
|
|
|
# Define the entry point for the docker container.
|
|
# This entry point starts the developer command prompt and launches the PowerShell shell.
|
|
ENTRYPOINT ["C:\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Unrestricted"] |