2023-06-14 20:27:48 UTC
1.72 GB
C:\openjdk-22
JAVA_SHA2569348aa2fc8344b25baad9b614627983b4e900ab0293ecfa3ec7f9b5d911a90a7
JAVA_URLhttps://download.java.net/java/early_access/jdk22/1/GPL/openjdk-22-ea+1_windows-x64_bin.zip
JAVA_VERSION22-ea+1
[#000] sha256:c9226d61d3bdbf9f09821b32f5878623b8daaa5fb4f875cb63c199f87a26d57e - 89.21% (1.54 GB)
[#001] sha256:b712a9a082fd391beaa9ca7c8e6c3fda37b0ad8d29cc4663173ed973b961d342 - 0.0% (1.36 KB)
[#002] sha256:1119c9dd4674cbb889b8cd01bbadf4652797b89d882f89be398f7da1beb24c70 - 0.02% (298 KB)
[#003] sha256:ba9ed58112430e156afd8c7eed20069147a2b5ecdb1b8da57264db5ea41dd214 - 0.0% (1.26 KB)
[#004] sha256:96e32d8326ab7a8f29c3209f83dfd8c39f6746f5de5efc42d984740194104030 - 0.01% (251 KB)
[#005] sha256:bbc1374ca12e0f000e82e2c894369b4e5e40f31d10eaa40bb2a3d8446328acbb - 0.0% (1.25 KB)
[#006] sha256:7b6fbe1cd76c2f5dd51ebc428cc6b545e292acb0da970dc61e818251ad4597af - 0.0% (1.26 KB)
[#007] sha256:7acd07a56ff8bc06dd0656094b648e16a36377c6b575ac138a348390321d43f7 - 0.0% (1.26 KB)
[#008] sha256:cc8a0ecc3119375481c9b19f2fc68f892dbbdb642f07f5a96a644b838f83dacb - 10.76% (190 MB)
[#009] sha256:0ac6df817569d846654eac06b7496a3be7a51b5c988f0d971780e6cd73b77c82 - 0.0% (1.26 KB)
Apply image 10.0.17763.4499
2023-06-14 17:39:58 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; #(nop) SHELL [powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';]
2023-06-14 20:26:18 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; Write-Host 'Enabling TLS 1.2 (https://githubengineering.com/crypto-removal-notice/) ...'; $tls12RegBase = 'HKLM:\\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2'; if (Test-Path $tls12RegBase) { throw ('"{0}" already exists!' -f $tls12RegBase) }; New-Item -Path ('{0}/Client' -f $tls12RegBase) -Force; New-Item -Path ('{0}/Server' -f $tls12RegBase) -Force; New-ItemProperty -Path ('{0}/Client' -f $tls12RegBase) -Name 'DisabledByDefault' -PropertyType DWORD -Value 0 -Force; New-ItemProperty -Path ('{0}/Client' -f $tls12RegBase) -Name 'Enabled' -PropertyType DWORD -Value 1 -Force; New-ItemProperty -Path ('{0}/Server' -f $tls12RegBase) -Name 'DisabledByDefault' -PropertyType DWORD -Value 0 -Force; New-ItemProperty -Path ('{0}/Server' -f $tls12RegBase) -Name 'Enabled' -PropertyType DWORD -Value 1 -Force; Write-Host 'Complete.'
2023-06-14 20:26:18 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; #(nop) ENV JAVA_HOME=C:\openjdk-22
2023-06-14 20:26:44 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); Write-Host ('Updating PATH: {0}' -f $newPath); setx /M PATH $newPath; Write-Host 'Complete.'
2023-06-14 20:26:44 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; #(nop) ENV JAVA_VERSION=22-ea+1
2023-06-14 20:26:45 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; #(nop) ENV JAVA_URL=https://download.java.net/java/early_access/jdk22/1/GPL/openjdk-22-ea+1_windows-x64_bin.zip
2023-06-14 20:26:46 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; #(nop) ENV JAVA_SHA256=9348aa2fc8344b25baad9b614627983b4e900ab0293ecfa3ec7f9b5d911a90a7
2023-06-14 20:27:47 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; Write-Host ('Downloading {0} ...' -f $env:JAVA_URL); [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri $env:JAVA_URL -OutFile 'openjdk.zip'; Write-Host ('Verifying sha256 ({0}) ...' -f $env:JAVA_SHA256); if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne $env:JAVA_SHA256) { Write-Host 'FAILED!'; exit 1; }; Write-Host 'Expanding ...'; New-Item -ItemType Directory -Path C:\temp | Out-Null; Expand-Archive openjdk.zip -DestinationPath C:\temp; Move-Item -Path C:\temp\* -Destination $env:JAVA_HOME; Remove-Item C:\temp; Write-Host 'Removing ...'; Remove-Item openjdk.zip -Force; Write-Host 'Verifying install ...'; Write-Host ' javac --version'; javac --version; Write-Host ' java --version'; java --version; Write-Host 'Complete.'
2023-06-14 20:27:48 UTCpowershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; #(nop) CMD ["jshell"]
Please be careful as this will not just delete the reference but also the actual content!
For example when you have latest and v1.2.3 both pointing to the same image
the deletion of latest will also permanently remove v1.2.3.