Skip to content

Commit d1ed807

Browse files
authored
minor refactor of windows dockerfiles (AdoptOpenJDK#181)
1 parent ce8b120 commit d1ed807

12 files changed

+125
-240
lines changed

11/jdk/windows/Dockerfile.hotspot.nightly.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,26 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk11u
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-06-11-10-43/OpenJDK11U-jdk_x64_windows_hotspot_2019-06-11-10-43.msi
31-
ENV JAVA_SHA256 518b3df42047385ba8cf3241696ef942eb4d1e36c87427212093c08c32d8d088
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-06-20-00-23/OpenJDK11U-jdk_x64_windows_hotspot_2019-06-20-00-23.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-06-20-00-23/OpenJDK11U-jdk_x64_windows_hotspot_2019-06-20-00-23.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (99e475db353ec098a90fe7280ef8a376ef6fde8c37f7feb7a7a3e037594dba21) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '99e475db353ec098a90fe7280ef8a376ef6fde8c37f7feb7a7a3e037594dba21') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
CMD ["jshell"]

11/jdk/windows/Dockerfile.hotspot.releases.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,26 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk-11.0.3+7
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.3_7.msi
31-
ENV JAVA_SHA256 6eb277a3e9305fdf380900d20f4ef7a474f13fdbc92f7709b57945f6ffdc80fc
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.3_7.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.3_7.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (6eb277a3e9305fdf380900d20f4ef7a474f13fdbc92f7709b57945f6ffdc80fc) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '6eb277a3e9305fdf380900d20f4ef7a474f13fdbc92f7709b57945f6ffdc80fc') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
CMD ["jshell"]

11/jdk/windows/Dockerfile.openj9.nightly.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,27 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk11u
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-06-11-10-43/OpenJDK11U-jdk_x64_windows_openj9_2019-06-11-10-43.msi
31-
ENV JAVA_SHA256 117efe910ac018d1504522c6fe1c8935a9edc953ca4796edc5dc2d2697c5f644
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-06-20-00-23/OpenJDK11U-jdk_x64_windows_openj9_2019-06-20-00-23.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2019-06-20-00-23/OpenJDK11U-jdk_x64_windows_openj9_2019-06-20-00-23.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (17982e571c1827eba88fbb45ebae72925b131908f176e8b46c9926d0ad882eb0) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '17982e571c1827eba88fbb45ebae72925b131908f176e8b46c9926d0ad882eb0') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle"
5545
CMD ["jshell"]

11/jdk/windows/Dockerfile.openj9.releases.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,27 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk-11.0.3+7_openj9-0.14.3
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.3/OpenJDK11U-jdk_x64_windows_openj9_11.0.3_7_openj9-0.14.3.msi
31-
ENV JAVA_SHA256 6894b6f09b0d2577370b6376255cb6a1b254ed186ac30b44563cf138bceb0552
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.3/OpenJDK11U-jdk_x64_windows_openj9_11.0.3_7_openj9-0.14.3.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.3/OpenJDK11U-jdk_x64_windows_openj9_11.0.3_7_openj9-0.14.3.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (6894b6f09b0d2577370b6376255cb6a1b254ed186ac30b44563cf138bceb0552) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '6894b6f09b0d2577370b6376255cb6a1b254ed186ac30b44563cf138bceb0552') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle"
5545
CMD ["jshell"]

12/jdk/windows/Dockerfile.hotspot.nightly.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,26 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk12u
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk12u-2019-06-11-01-17/OpenJDK12U-jdk_x64_windows_hotspot_2019-06-11-01-17.msi
31-
ENV JAVA_SHA256 fef16e153a658aedcc56c452435b2932f521d8c0f7120b79d87603e89f50d681
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk12u-2019-06-19-17-56/OpenJDK12U-jdk_x64_windows_hotspot_2019-06-19-17-56.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk12u-2019-06-19-17-56/OpenJDK12U-jdk_x64_windows_hotspot_2019-06-19-17-56.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (da35b3344ab0977f7533c18fbeb4c82fa1ee487d7685b450186a66d287f059a7) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'da35b3344ab0977f7533c18fbeb4c82fa1ee487d7685b450186a66d287f059a7') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
CMD ["jshell"]

12/jdk/windows/Dockerfile.hotspot.releases.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,26 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk-12.0.1+12
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_windows_hotspot_12.0.1_12.msi
31-
ENV JAVA_SHA256 c08f97625f0562889497b4cfc023bd06ada9554050c9b34c1050167fcf89847c
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_windows_hotspot_12.0.1_12.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_windows_hotspot_12.0.1_12.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (c08f97625f0562889497b4cfc023bd06ada9554050c9b34c1050167fcf89847c) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'c08f97625f0562889497b4cfc023bd06ada9554050c9b34c1050167fcf89847c') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
CMD ["jshell"]

12/jdk/windows/Dockerfile.openj9.releases.full

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,27 @@
1919

2020
FROM mcr.microsoft.com/windows/servercore:ltsc2016
2121

22-
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23-
24-
2522
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
2623
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
2724

2825
ENV JAVA_VERSION jdk-12.0.1+12_openj9-0.14.1
2926

30-
ENV JAVA_URL https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12_openj9-0.14.1/OpenJDK12U-jdk_x64_windows_openj9_12.0.1_12_openj9-0.14.1.msi
31-
ENV JAVA_SHA256 78395cc7fd457b6a5c5be31f633a566e85e35cc042a7fa5a591e61546c28aacc
32-
33-
RUN Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); \
27+
RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12_openj9-0.14.1/OpenJDK12U-jdk_x64_windows_openj9_12.0.1_12_openj9-0.14.1.msi ...'); \
3428
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
35-
wget $env:JAVA_URL -O 'openjdk.msi'; \
36-
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); \
37-
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { \
29+
wget https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12_openj9-0.14.1/OpenJDK12U-jdk_x64_windows_openj9_12.0.1_12_openj9-0.14.1.msi -O 'openjdk.msi'; \
30+
Write-Host ('Verifying sha256 (78395cc7fd457b6a5c5be31f633a566e85e35cc042a7fa5a591e61546c28aacc) ...'); \
31+
if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '78395cc7fd457b6a5c5be31f633a566e85e35cc042a7fa5a591e61546c28aacc') { \
3832
Write-Host 'FAILED!'; \
3933
exit 1; \
4034
}; \
4135
\
42-
New-Item -ItemType Directory -Path C:\temp | Out-Null;
43-
44-
RUN Write-Host 'Installing using MSI ...'; \
36+
New-Item -ItemType Directory -Path C:\temp | Out-Null; \
37+
\
38+
Write-Host 'Installing using MSI ...'; \
4539
Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \
4640
'/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \
47-
Write-Host 'Removing ...'; \
48-
Remove-Item openjdk.msi -Force;
49-
50-
RUN Write-Host 'Verifying install ...'; \
51-
Write-Host ' java -version'; java -version; \
52-
Write-Host ' javac -version'; javac -version; \
53-
Write-Host ' JAVA_HOME'; Test-Path $env:JAVA_HOME;
41+
Write-Host 'Removing openjdk.msi ...'; \
42+
Remove-Item openjdk.msi -Force; \
43+
Remove-Item -Path C:\temp -Recurse | Out-Null;
5444
ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle"
5545
CMD ["jshell"]

0 commit comments

Comments
 (0)