diff --git a/5.0-rc/windows/windowsservercore-ltsc2025/Dockerfile b/5.0-rc/windows/windowsservercore-ltsc2025/Dockerfile new file mode 100644 index 000000000..fd3d9bbdb --- /dev/null +++ b/5.0-rc/windows/windowsservercore-ltsc2025/Dockerfile @@ -0,0 +1,68 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +# https://docs.mongodb.org/master/release-notes/5.0/ +ENV MONGO_VERSION 5.0.31-rc1 +# 01/09/2025, https://github.com/mongodb/mongo/tree/973237567d45610d6976d5d489dfaaef6a52c2f9 + +ENV MONGO_DOWNLOAD_URL https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-5.0.31-rc1-signed.msi +ENV MONGO_DOWNLOAD_SHA256=598aed12e48cab241ef048580d624fbbc78c24b947e56e5702e9a8cedba0476d + +RUN Write-Host ('Downloading {0} ...' -f $env:MONGO_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + (New-Object System.Net.WebClient).DownloadFile($env:MONGO_DOWNLOAD_URL, 'mongo.msi'); \ + \ + if ($env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MONGO_DOWNLOAD_SHA256); \ + if ((Get-FileHash mongo.msi -Algorithm sha256).Hash -ne $env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + }; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#install-mongodb-community-edition + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'mongo.msi', \ + '/quiet', \ + '/qn', \ + '/l*v', 'install.log', \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#run-the-windows-installer-from-the-windows-command-interpreter + 'INSTALLLOCATION=C:\mongodb', \ + 'ADDLOCAL=Client,MiscellaneousTools,Router,ServerNoService' \ + ); \ + if (-Not (Test-Path C:\mongodb\bin\mongod.exe -PathType Leaf)) { \ + Write-Host 'Installer failed!'; \ + Get-Content install.log; \ + exit 1; \ + }; \ + Remove-Item install.log; \ + \ + $env:PATH = 'C:\mongodb\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' mongo --version'; mongo --version; \ + Write-Host ' mongod --version'; mongod --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item C:\windows\installer\*.msi -Force; \ + Remove-Item mongo.msi -Force; \ + \ + Write-Host 'Complete.'; + +# TODO docker-entrypoint.ps1 ? (for "docker run --flag --flag --flag") + +VOLUME C:\\data\\db C:\\data\\configdb + +EXPOSE 27017 +CMD ["mongod", "--bind_ip_all"] diff --git a/5.0/windows/windowsservercore-ltsc2025/Dockerfile b/5.0/windows/windowsservercore-ltsc2025/Dockerfile new file mode 100644 index 000000000..ab09fdde3 --- /dev/null +++ b/5.0/windows/windowsservercore-ltsc2025/Dockerfile @@ -0,0 +1,68 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +# https://docs.mongodb.org/master/release-notes/5.0/ +ENV MONGO_VERSION 5.0.30 +# 10/17/2024, https://github.com/mongodb/mongo/tree/966efda23d779a86c76c34e1b13e561d68f2bb37 + +ENV MONGO_DOWNLOAD_URL https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-5.0.30-signed.msi +ENV MONGO_DOWNLOAD_SHA256=acabc07cba2e1b4a8bc2a852715a21ca29cae0f08a0dc157d54c1049f586fe45 + +RUN Write-Host ('Downloading {0} ...' -f $env:MONGO_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + (New-Object System.Net.WebClient).DownloadFile($env:MONGO_DOWNLOAD_URL, 'mongo.msi'); \ + \ + if ($env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MONGO_DOWNLOAD_SHA256); \ + if ((Get-FileHash mongo.msi -Algorithm sha256).Hash -ne $env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + }; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#install-mongodb-community-edition + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'mongo.msi', \ + '/quiet', \ + '/qn', \ + '/l*v', 'install.log', \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#run-the-windows-installer-from-the-windows-command-interpreter + 'INSTALLLOCATION=C:\mongodb', \ + 'ADDLOCAL=Client,MiscellaneousTools,Router,ServerNoService' \ + ); \ + if (-Not (Test-Path C:\mongodb\bin\mongod.exe -PathType Leaf)) { \ + Write-Host 'Installer failed!'; \ + Get-Content install.log; \ + exit 1; \ + }; \ + Remove-Item install.log; \ + \ + $env:PATH = 'C:\mongodb\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' mongo --version'; mongo --version; \ + Write-Host ' mongod --version'; mongod --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item C:\windows\installer\*.msi -Force; \ + Remove-Item mongo.msi -Force; \ + \ + Write-Host 'Complete.'; + +# TODO docker-entrypoint.ps1 ? (for "docker run --flag --flag --flag") + +VOLUME C:\\data\\db C:\\data\\configdb + +EXPOSE 27017 +CMD ["mongod", "--bind_ip_all"] diff --git a/6.0/windows/windowsservercore-ltsc2025/Dockerfile b/6.0/windows/windowsservercore-ltsc2025/Dockerfile new file mode 100644 index 000000000..b842e1537 --- /dev/null +++ b/6.0/windows/windowsservercore-ltsc2025/Dockerfile @@ -0,0 +1,67 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +# https://docs.mongodb.org/master/release-notes/6.0/ +ENV MONGO_VERSION 6.0.20 +# 12/20/2024, https://github.com/mongodb/mongo/tree/ef4efd469fb0c5626c629c4f0f21398c9b5dd08f + +ENV MONGO_DOWNLOAD_URL https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-6.0.20-signed.msi +ENV MONGO_DOWNLOAD_SHA256=518cf974540402bd2992996372d29dd13912e2662d2288649e7984ed091a5e5c + +RUN Write-Host ('Downloading {0} ...' -f $env:MONGO_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + (New-Object System.Net.WebClient).DownloadFile($env:MONGO_DOWNLOAD_URL, 'mongo.msi'); \ + \ + if ($env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MONGO_DOWNLOAD_SHA256); \ + if ((Get-FileHash mongo.msi -Algorithm sha256).Hash -ne $env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + }; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#install-mongodb-community-edition + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'mongo.msi', \ + '/quiet', \ + '/qn', \ + '/l*v', 'install.log', \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#run-the-windows-installer-from-the-windows-command-interpreter + 'INSTALLLOCATION=C:\mongodb', \ + 'ADDLOCAL=MiscellaneousTools,Router,ServerNoService' \ + ); \ + if (-Not (Test-Path C:\mongodb\bin\mongod.exe -PathType Leaf)) { \ + Write-Host 'Installer failed!'; \ + Get-Content install.log; \ + exit 1; \ + }; \ + Remove-Item install.log; \ + \ + $env:PATH = 'C:\mongodb\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' mongod --version'; mongod --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item C:\windows\installer\*.msi -Force; \ + Remove-Item mongo.msi -Force; \ + \ + Write-Host 'Complete.'; + +# TODO docker-entrypoint.ps1 ? (for "docker run --flag --flag --flag") + +VOLUME C:\\data\\db C:\\data\\configdb + +EXPOSE 27017 +CMD ["mongod", "--bind_ip_all"] diff --git a/7.0/windows/windowsservercore-ltsc2025/Dockerfile b/7.0/windows/windowsservercore-ltsc2025/Dockerfile new file mode 100644 index 000000000..ef162e00e --- /dev/null +++ b/7.0/windows/windowsservercore-ltsc2025/Dockerfile @@ -0,0 +1,67 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +# https://docs.mongodb.org/master/release-notes/7.0/ +ENV MONGO_VERSION 7.0.16 +# 12/11/2024, https://github.com/mongodb/mongo/tree/18b949444cfdaa88e30b0e10243bc18268251c1f + +ENV MONGO_DOWNLOAD_URL https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.16-signed.msi +ENV MONGO_DOWNLOAD_SHA256=88fe05d7f324e72b9d17cbfe9bde652053c398efc7cffc0249c944faf4f32b34 + +RUN Write-Host ('Downloading {0} ...' -f $env:MONGO_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + (New-Object System.Net.WebClient).DownloadFile($env:MONGO_DOWNLOAD_URL, 'mongo.msi'); \ + \ + if ($env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MONGO_DOWNLOAD_SHA256); \ + if ((Get-FileHash mongo.msi -Algorithm sha256).Hash -ne $env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + }; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#install-mongodb-community-edition + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'mongo.msi', \ + '/quiet', \ + '/qn', \ + '/l*v', 'install.log', \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#run-the-windows-installer-from-the-windows-command-interpreter + 'INSTALLLOCATION=C:\mongodb', \ + 'ADDLOCAL=MiscellaneousTools,Router,ServerNoService' \ + ); \ + if (-Not (Test-Path C:\mongodb\bin\mongod.exe -PathType Leaf)) { \ + Write-Host 'Installer failed!'; \ + Get-Content install.log; \ + exit 1; \ + }; \ + Remove-Item install.log; \ + \ + $env:PATH = 'C:\mongodb\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' mongod --version'; mongod --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item C:\windows\installer\*.msi -Force; \ + Remove-Item mongo.msi -Force; \ + \ + Write-Host 'Complete.'; + +# TODO docker-entrypoint.ps1 ? (for "docker run --flag --flag --flag") + +VOLUME C:\\data\\db C:\\data\\configdb + +EXPOSE 27017 +CMD ["mongod", "--bind_ip_all"] diff --git a/8.0/windows/windowsservercore-ltsc2025/Dockerfile b/8.0/windows/windowsservercore-ltsc2025/Dockerfile new file mode 100644 index 000000000..9fd0e04dd --- /dev/null +++ b/8.0/windows/windowsservercore-ltsc2025/Dockerfile @@ -0,0 +1,67 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +# https://docs.mongodb.org/master/release-notes/8.0/ +ENV MONGO_VERSION 8.0.4 +# 11/27/2024, https://github.com/mongodb/mongo/tree/bc35ab4305d9920d9d0491c1c9ef9b72383d31f9 + +ENV MONGO_DOWNLOAD_URL https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-8.0.4-signed.msi +ENV MONGO_DOWNLOAD_SHA256=52d30392e6767eb48c03fc9886b831da5a282af7aba49cc46f45c6b0f85280cb + +RUN Write-Host ('Downloading {0} ...' -f $env:MONGO_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + (New-Object System.Net.WebClient).DownloadFile($env:MONGO_DOWNLOAD_URL, 'mongo.msi'); \ + \ + if ($env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MONGO_DOWNLOAD_SHA256); \ + if ((Get-FileHash mongo.msi -Algorithm sha256).Hash -ne $env:MONGO_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + }; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#install-mongodb-community-edition + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'mongo.msi', \ + '/quiet', \ + '/qn', \ + '/l*v', 'install.log', \ +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#run-the-windows-installer-from-the-windows-command-interpreter + 'INSTALLLOCATION=C:\mongodb', \ + 'ADDLOCAL=MiscellaneousTools,Router,ServerNoService' \ + ); \ + if (-Not (Test-Path C:\mongodb\bin\mongod.exe -PathType Leaf)) { \ + Write-Host 'Installer failed!'; \ + Get-Content install.log; \ + exit 1; \ + }; \ + Remove-Item install.log; \ + \ + $env:PATH = 'C:\mongodb\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' mongod --version'; mongod --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item C:\windows\installer\*.msi -Force; \ + Remove-Item mongo.msi -Force; \ + \ + Write-Host 'Complete.'; + +# TODO docker-entrypoint.ps1 ? (for "docker run --flag --flag --flag") + +VOLUME C:\\data\\db C:\\data\\configdb + +EXPOSE 27017 +CMD ["mongod", "--bind_ip_all"] diff --git a/versions.json b/versions.json index afbce9891..85c8c6082 100644 --- a/versions.json +++ b/versions.json @@ -49,6 +49,7 @@ "msi": "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-5.0.30-signed.msi", "sha256": "acabc07cba2e1b4a8bc2a852715a21ca29cae0f08a0dc157d54c1049f586fe45", "variants": [ + "windowsservercore-ltsc2025", "windowsservercore-ltsc2022", "windowsservercore-1809", "nanoserver-ltsc2022", @@ -114,6 +115,7 @@ "msi": "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-5.0.31-rc1-signed.msi", "sha256": "598aed12e48cab241ef048580d624fbbc78c24b947e56e5702e9a8cedba0476d", "variants": [ + "windowsservercore-ltsc2025", "windowsservercore-ltsc2022", "windowsservercore-1809", "nanoserver-ltsc2022", @@ -180,6 +182,7 @@ "msi": "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-6.0.20-signed.msi", "sha256": "518cf974540402bd2992996372d29dd13912e2662d2288649e7984ed091a5e5c", "variants": [ + "windowsservercore-ltsc2025", "windowsservercore-ltsc2022", "windowsservercore-1809", "nanoserver-ltsc2022", @@ -247,6 +250,7 @@ "msi": "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.16-signed.msi", "sha256": "88fe05d7f324e72b9d17cbfe9bde652053c398efc7cffc0249c944faf4f32b34", "variants": [ + "windowsservercore-ltsc2025", "windowsservercore-ltsc2022", "windowsservercore-1809", "nanoserver-ltsc2022", @@ -315,6 +319,7 @@ "msi": "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-8.0.4-signed.msi", "sha256": "52d30392e6767eb48c03fc9886b831da5a282af7aba49cc46f45c6b0f85280cb", "variants": [ + "windowsservercore-ltsc2025", "windowsservercore-ltsc2022", "windowsservercore-1809", "nanoserver-ltsc2022", diff --git a/versions.sh b/versions.sh index 75c89afbf..fa5bcaeef 100755 --- a/versions.sh +++ b/versions.sh @@ -184,8 +184,10 @@ for version in "${versions[@]}"; do msi: env.msiUrl, sha256: env.msiSha256, variants: [ + "windowsservercore-ltsc2025", "windowsservercore-ltsc2022", "windowsservercore-1809", + #"nanoserver-ltsc2025", # The command "cmd /S /C mongod --version" returned a non-zero code: 3221225785 "nanoserver-ltsc2022", "nanoserver-1809" ],