Skip to content

Commit 823517c

Browse files
authored
Merge pull request #227 from infosiftr/windows-jdk.java.net
Add Windows bits for 11 and 12 from jdk.java.net (official upstream builds!)
2 parents ecb8162 + bf06437 commit 823517c

File tree

9 files changed

+409
-137
lines changed

9 files changed

+409
-137
lines changed

.appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ image: Visual Studio 2017
33

44
environment:
55
matrix:
6+
- version: 12
7+
variant: windowsservercore-ltsc2016
8+
- version: 11
9+
variant: windowsservercore-ltsc2016
610
- version: 10
711
variant: windowsservercore-ltsc2016
812
- version: 10
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM microsoft/windowsservercore:1709
2+
3+
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
4+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5+
6+
ENV JAVA_HOME C:\\jdk-11
7+
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
8+
Write-Host ('Updating PATH: {0}' -f $newPath); \
9+
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
10+
setx /M PATH $newPath
11+
12+
# http://jdk.java.net/
13+
ENV JAVA_VERSION 11+28
14+
ENV JAVA_URL https://download.java.net/java/early_access/jdk11/28/GPL/openjdk-11+28_windows-x64_bin.zip
15+
ENV JAVA_SHA256 fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b
16+
17+
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
18+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
19+
Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; \
20+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
21+
if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
22+
Write-Host 'FAILED!'; \
23+
exit 1; \
24+
}; \
25+
\
26+
Write-Host 'Expanding ...'; \
27+
Expand-Archive openjdk.zip -DestinationPath C:\; \
28+
\
29+
Write-Host 'Verifying install ...'; \
30+
Write-Host ' java -version'; java -version; \
31+
Write-Host ' javac -version'; javac -version; \
32+
\
33+
Write-Host 'Removing ...'; \
34+
Remove-Item openjdk.zip -Force; \
35+
\
36+
Write-Host 'Complete.'
37+
38+
# https://docs.oracle.com/javase/10/tools/jshell.htm
39+
# https://en.wikipedia.org/wiki/JShell
40+
CMD ["jshell"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM microsoft/windowsservercore:1803
2+
3+
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
4+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5+
6+
ENV JAVA_HOME C:\\jdk-11
7+
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
8+
Write-Host ('Updating PATH: {0}' -f $newPath); \
9+
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
10+
setx /M PATH $newPath
11+
12+
# http://jdk.java.net/
13+
ENV JAVA_VERSION 11+28
14+
ENV JAVA_URL https://download.java.net/java/early_access/jdk11/28/GPL/openjdk-11+28_windows-x64_bin.zip
15+
ENV JAVA_SHA256 fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b
16+
17+
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
18+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
19+
Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; \
20+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
21+
if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
22+
Write-Host 'FAILED!'; \
23+
exit 1; \
24+
}; \
25+
\
26+
Write-Host 'Expanding ...'; \
27+
Expand-Archive openjdk.zip -DestinationPath C:\; \
28+
\
29+
Write-Host 'Verifying install ...'; \
30+
Write-Host ' java -version'; java -version; \
31+
Write-Host ' javac -version'; javac -version; \
32+
\
33+
Write-Host 'Removing ...'; \
34+
Remove-Item openjdk.zip -Force; \
35+
\
36+
Write-Host 'Complete.'
37+
38+
# https://docs.oracle.com/javase/10/tools/jshell.htm
39+
# https://en.wikipedia.org/wiki/JShell
40+
CMD ["jshell"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM microsoft/windowsservercore:ltsc2016
2+
3+
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
4+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5+
6+
ENV JAVA_HOME C:\\jdk-11
7+
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
8+
Write-Host ('Updating PATH: {0}' -f $newPath); \
9+
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
10+
setx /M PATH $newPath
11+
12+
# http://jdk.java.net/
13+
ENV JAVA_VERSION 11+28
14+
ENV JAVA_URL https://download.java.net/java/early_access/jdk11/28/GPL/openjdk-11+28_windows-x64_bin.zip
15+
ENV JAVA_SHA256 fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b
16+
17+
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
18+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
19+
Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; \
20+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
21+
if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
22+
Write-Host 'FAILED!'; \
23+
exit 1; \
24+
}; \
25+
\
26+
Write-Host 'Expanding ...'; \
27+
Expand-Archive openjdk.zip -DestinationPath C:\; \
28+
\
29+
Write-Host 'Verifying install ...'; \
30+
Write-Host ' java -version'; java -version; \
31+
Write-Host ' javac -version'; javac -version; \
32+
\
33+
Write-Host 'Removing ...'; \
34+
Remove-Item openjdk.zip -Force; \
35+
\
36+
Write-Host 'Complete.'
37+
38+
# https://docs.oracle.com/javase/10/tools/jshell.htm
39+
# https://en.wikipedia.org/wiki/JShell
40+
CMD ["jshell"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM microsoft/windowsservercore:1709
2+
3+
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
4+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5+
6+
ENV JAVA_HOME C:\\jdk-12
7+
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
8+
Write-Host ('Updating PATH: {0}' -f $newPath); \
9+
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
10+
setx /M PATH $newPath
11+
12+
# http://jdk.java.net/
13+
ENV JAVA_VERSION 12-ea+9
14+
ENV JAVA_URL https://download.java.net/java/early_access/jdk12/9/GPL/openjdk-12-ea+9_windows-x64_bin.zip
15+
ENV JAVA_SHA256 49eb49f808d2beff6c977f2f60aa75f17c8adbb3280bea482816aa6a083b0952
16+
17+
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
18+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
19+
Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; \
20+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
21+
if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
22+
Write-Host 'FAILED!'; \
23+
exit 1; \
24+
}; \
25+
\
26+
Write-Host 'Expanding ...'; \
27+
Expand-Archive openjdk.zip -DestinationPath C:\; \
28+
\
29+
Write-Host 'Verifying install ...'; \
30+
Write-Host ' java -version'; java -version; \
31+
Write-Host ' javac -version'; javac -version; \
32+
\
33+
Write-Host 'Removing ...'; \
34+
Remove-Item openjdk.zip -Force; \
35+
\
36+
Write-Host 'Complete.'
37+
38+
# https://docs.oracle.com/javase/10/tools/jshell.htm
39+
# https://en.wikipedia.org/wiki/JShell
40+
CMD ["jshell"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM microsoft/windowsservercore:1803
2+
3+
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
4+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5+
6+
ENV JAVA_HOME C:\\jdk-12
7+
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
8+
Write-Host ('Updating PATH: {0}' -f $newPath); \
9+
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
10+
setx /M PATH $newPath
11+
12+
# http://jdk.java.net/
13+
ENV JAVA_VERSION 12-ea+9
14+
ENV JAVA_URL https://download.java.net/java/early_access/jdk12/9/GPL/openjdk-12-ea+9_windows-x64_bin.zip
15+
ENV JAVA_SHA256 49eb49f808d2beff6c977f2f60aa75f17c8adbb3280bea482816aa6a083b0952
16+
17+
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
18+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
19+
Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; \
20+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
21+
if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
22+
Write-Host 'FAILED!'; \
23+
exit 1; \
24+
}; \
25+
\
26+
Write-Host 'Expanding ...'; \
27+
Expand-Archive openjdk.zip -DestinationPath C:\; \
28+
\
29+
Write-Host 'Verifying install ...'; \
30+
Write-Host ' java -version'; java -version; \
31+
Write-Host ' javac -version'; javac -version; \
32+
\
33+
Write-Host 'Removing ...'; \
34+
Remove-Item openjdk.zip -Force; \
35+
\
36+
Write-Host 'Complete.'
37+
38+
# https://docs.oracle.com/javase/10/tools/jshell.htm
39+
# https://en.wikipedia.org/wiki/JShell
40+
CMD ["jshell"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM microsoft/windowsservercore:ltsc2016
2+
3+
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
4+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5+
6+
ENV JAVA_HOME C:\\jdk-12
7+
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
8+
Write-Host ('Updating PATH: {0}' -f $newPath); \
9+
# Nano Server does not have "[Environment]::SetEnvironmentVariable()"
10+
setx /M PATH $newPath
11+
12+
# http://jdk.java.net/
13+
ENV JAVA_VERSION 12-ea+9
14+
ENV JAVA_URL https://download.java.net/java/early_access/jdk12/9/GPL/openjdk-12-ea+9_windows-x64_bin.zip
15+
ENV JAVA_SHA256 49eb49f808d2beff6c977f2f60aa75f17c8adbb3280bea482816aa6a083b0952
16+
17+
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
18+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
19+
Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; \
20+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
21+
if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
22+
Write-Host 'FAILED!'; \
23+
exit 1; \
24+
}; \
25+
\
26+
Write-Host 'Expanding ...'; \
27+
Expand-Archive openjdk.zip -DestinationPath C:\; \
28+
\
29+
Write-Host 'Verifying install ...'; \
30+
Write-Host ' java -version'; java -version; \
31+
Write-Host ' javac -version'; javac -version; \
32+
\
33+
Write-Host 'Removing ...'; \
34+
Remove-Item openjdk.zip -Force; \
35+
\
36+
Write-Host 'Complete.'
37+
38+
# https://docs.oracle.com/javase/10/tools/jshell.htm
39+
# https://en.wikipedia.org/wiki/JShell
40+
CMD ["jshell"]

generate-stackbrew-library.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ for javaVersion in "${versions[@]}"; do
125125
for javaType in jdk jre; do
126126
for v in \
127127
'' slim alpine \
128-
windows/windowsservercore-{ltsc2016,1709} \
129-
windows/nanoserver-{sac2016,1709} \
128+
windows/windowsservercore-{ltsc2016,1709,1803} \
129+
windows/nanoserver-{sac2016,1709,1803} \
130130
; do
131131
dir="$javaVersion/$javaType${v:+/$v}"
132132
[ -n "$v" ] && variant="$(basename "$v")" || variant=

0 commit comments

Comments
 (0)