3
3
4
4
# ---------------- GLOBAL VARS ----------------
5
5
ARG NODE_VERSION=23.10.0
6
+ ARG ZSTD_VERSION=1.5.7
6
7
7
8
ARG GODBOLT_REMOTE=https://github.com/compiler-explorer/compiler-explorer.git
8
9
ARG GODBOLT_SHA=fc1b97ef9325eacbb8100d280aee0b0158a5adca
9
10
10
- ARG IMPL_NANO_BASE=mcr.microsoft.com/powershell
11
- ARG IMPL_NANO_TAG=lts-nanoserver-ltsc2022
12
11
ARG IMPL_GIT_VERSION=2.48.1
13
12
ARG IMPL_ARTIFACTS_DIR="C:\a rtifacts"
14
13
14
+ ARG IMPL_NANO_BASE=mcr.microsoft.com/powershell
15
+ ARG IMPL_NANO_TAG=lts-nanoserver-ltsc2022
16
+
15
17
# ---------------- NODE JS ----------------
16
18
FROM ${IMPL_NANO_BASE}:${IMPL_NANO_TAG} as node
17
19
SHELL ["pwsh" , "-NoLogo" , "-NoProfile" , "-ExecutionPolicy" , "Bypass" , "-Command" ]
@@ -21,7 +23,7 @@ ARG IMPL_ARTIFACTS_DIR
21
23
22
24
RUN Write-Host "Installing NodeJS $env:NODE_VERSION" ; `
23
25
New-Item -ItemType Directory -Force -Path "C:\T emp" , $env:IMPL_ARTIFACTS_DIR ; `
24
- Invoke-WebRequest -Uri https://nodejs.org/download/release/latest /node-v$env:NODE_VERSION-win-x64.zip -OutFile C:\T emp\n odejs.zip ; `
26
+ Invoke-WebRequest -Uri https://nodejs.org/download/release/v$env:NODE_VERSION /node-v$env:NODE_VERSION-win-x64.zip -OutFile C:\T emp\n odejs.zip ; `
25
27
tar -xf C:\T emp\n odejs.zip -C $env:IMPL_ARTIFACTS_DIR ; Remove-Item C:\T emp\n odejs.zip
26
28
27
29
# ---------------- GIT ----------------
@@ -65,24 +67,46 @@ RUN cd $env:IMPL_ARTIFACTS_DIR ; `
65
67
Write-Host "Building Compiler Explorer" ; `
66
68
pwsh -File build-win.ps1 -CEWD "$env:IMPL_ARTIFACTS_DIR"
67
69
68
- # ---------------- FINAL IMAGE ----------------
69
- FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
70
+ # ---------------- ZSTD ----------------
71
+ FROM ${IMPL_NANO_BASE}:${IMPL_NANO_TAG} as zstd
72
+ SHELL ["pwsh" , "-NoLogo" , "-NoProfile" , "-ExecutionPolicy" , "Bypass" , "-Command" ]
70
73
74
+ ARG ZSTD_VERSION
71
75
ARG IMPL_ARTIFACTS_DIR
72
- ARG NODE_VERSION
73
76
77
+ RUN Write-Host "Installing Git $env:ZSTD_VERSION" ; `
78
+ New-Item -ItemType Directory -Force -Path C:\T emp, $env:IMPL_ARTIFACTS_DIR ; `
79
+ Invoke-WebRequest -Uri "https://github.com/facebook/zstd/releases/download/v$env:ZSTD_VERSION/zstd-v$env:ZSTD_VERSION-win64.zip" -OutFile C:\T emp\z std.zip ; `
80
+ tar -xf C:\T emp\z std.zip -C $env:IMPL_ARTIFACTS_DIR ; `
81
+ Remove-Item C:\T emp\z std.zip
82
+
83
+ # ---------------- FINAL IMAGE ----------------
84
+ FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
74
85
USER ContainerAdministrator
75
86
87
+ LABEL org.opencontainers.image.title="Compiler Explorer in Windows Nano Server"
88
+ LABEL org.opencontainers.image.source=https://github.com/Devsh-Graphics-Programming/Compiler-Explorer-Docker
89
+ LABEL org.opencontainers.image.description="Run Compiler Explorer in Windows Nano Server!"
90
+ LABEL org.opencontainers.image.licenses=Apache-2.0
91
+
92
+ ARG IMPL_ARTIFACTS_DIR
93
+ ARG NODE_VERSION
94
+ COPY --link --from=zstd ["${IMPL_ARTIFACTS_DIR}" , "C:/compress" ]
76
95
COPY --link --from=node ["${IMPL_ARTIFACTS_DIR}/node-v${NODE_VERSION}-win-x64" , "C:/Node" ]
77
96
COPY --link --from=compiler-explorer ["${IMPL_ARTIFACTS_DIR}/out/dist" , "C:/Compiler-Explorer" ]
78
97
COPY --link --from=compiler-explorer ["${IMPL_ARTIFACTS_DIR}/out/dist-bin/dist" , "C:/Compiler-Explorer" ]
79
98
COPY --link --from=compiler-explorer ["${IMPL_ARTIFACTS_DIR}/out/webpack/static" , "C:/Compiler-Explorer/static" ]
80
99
81
- ENV NODE_VERSION=${NODE_VERSION} NODE_ENV=production `
82
- PATH="C:\W indows\s ystem32;C:\W indows;C:\P rogram Files\P owerShell;C:\N ode"
100
+ ARG ZSTD_VERSION
101
+
102
+ ENV NODE_VERSION=${NODE_VERSION} `
103
+ NODE_ENV=production `
104
+ ZSTD_VERSION=${ZSTD_VERSION} `
105
+ PATH="C:\W indows\s ystem32;C:\W indows;C:\N ode;C:\c ompress\z std-v${ZSTD_VERSION}-win64"
83
106
84
107
EXPOSE 10240
85
- WORKDIR C:\\ Compiler-Explorer
86
- ENTRYPOINT ["cmd.exe" , "/C" ]
87
- CMD ["node" , "--no-warnings" , "--no-deprecation" , "--import=tsx" , "./app.js" , "--language" , "python" ]
88
- # for instance, <...> --language HLSL; note we are running without any compilers in this example, one have to provide them
108
+ COPY unpack.bat .
109
+ WORKDIR C:\C ompiler-Explorer
110
+
111
+ ENTRYPOINT ["cmd.exe" , "/S" , "/K" ]
112
+ CMD ["C:/unpack.bat" ]
0 commit comments