-
Notifications
You must be signed in to change notification settings - Fork 10
/
dockerfile
54 lines (45 loc) · 3.33 KB
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
######
# Build apsim revisions
# To install Mingw 32bit need to use choco directly rather than via Install-Package because some parameters
# need to be passed that can't be done with Install-Package. https://github.com/OneGet/oneget/issues/277
# Microsoft build tools components: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
# Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop is needed for shlwapi.h, shlobj.h, etc.
# Microsoft.Net.Component.4.6.1.SDK is needed for mscoree.h
# 7zip installs to c:\programdata\chocolatey\tools which isn't on PATH. I can't figure out how to change PATH so I
# copy executable files to c:\programdata\chocolatey\bin which is on path.
# VS Build tools component IDs can be found here: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools
######
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
SHELL ["powershell", "-Command"]
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; \
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
choco feature disable –name showDownloadProgress; \
choco feature enable -n allowGlobalConfirmation; \
choco install 7zip; \
choco install mingw --x86 --force --params "/exception:sjlj"; \
choco install make; \
choco install git.portable; \
choco install curl; \
choco install vcredist2010; \
choco install nunit-console-runner; \
choco install r.project; \
choco install nuget.commandline;
# Now install some missing build tools
ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:/vs_buildtools.exe
RUN Start-Process -FilePath 'vs_BuildTools.exe' -Wait -ArgumentList '--quiet', '--wait', '--norestart', '--nocache', '--installPath C:\BuildTools', '--add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop', '--add Microsoft.Net.Component.4.6.1.SDK', '--add Microsoft.VisualStudio.Workload.VCTools', '--add Microsoft.VisualStudio.Component.NuGet.BuildTools', '--add Microsoft.Net.Component.4.5.TargetingPack';
RUN rm /vs_buildtools.exe;
# Get the BOB build libraries that contain libxml, cppunit etc. and extract
ADD https://apsimdev.apsim.info/APSIMClassicFiles/BuildLibraries.7z /BuildLibraries.7z
RUN 7z x /BuildLibraries.7z -o/
RUN rm /BuildLibraries.7z
# Add in cotton password file
ADD https://apsimdev.apsim.info/APSIMClassicFiles/CottonPassword.txt /CottonPassword.txt
# Install InnoSetup
ADD http://www.jrsoftware.org/download.php/is.exe /is.exe
RUN cmd /c start /wait is.exe /SUPPRESSMSGBOXES /VERYSILENT /LOG=is.out /NORESTART
# Install 64-bit 7zip.
ADD https://www.7-zip.org/a/7z2201-x64.msi /7z_install_x64.msi
RUN cmd /c start /wait 7z_install_x64.msi /quiet /passive /qn
COPY include/* /
ENTRYPOINT ["compile.bat"]