From 673f328f1cc66892d6dd3b34f006c9d1c7b495bf Mon Sep 17 00:00:00 2001 From: "stam@epicm.org" Date: Wed, 6 Mar 2024 02:20:40 +0300 Subject: [PATCH] win32 update --- .../microsoft-windows-servercore/Dockerfile | 29 ++--- .../microsoft-windows-servercore/Makefile | 0 .../microsoft-windows-servercore/README.md | 0 .../docker-compose.yml | 6 + .../docker-compose.yml | 7 - win32/ecosystem/epicmorg/iis/Dockerfile | 121 ------------------ .../ecosystem/epicmorg/iis/docker-compose.yml | 6 - win32/ecosystem/microsoft/iis/Dockerfile | 45 +++++++ .../{epicmorg => microsoft}/iis/Makefile | 0 .../{epicmorg => microsoft}/iis/README.md | 0 .../microsoft/iis/docker-compose.yml | 6 + 11 files changed, 70 insertions(+), 150 deletions(-) rename win32/{ecosystem/epicmorg/base => advanced}/microsoft-windows-servercore/Dockerfile (80%) rename win32/{ecosystem/epicmorg/base => advanced}/microsoft-windows-servercore/Makefile (100%) rename win32/{ecosystem/epicmorg/base => advanced}/microsoft-windows-servercore/README.md (100%) create mode 100644 win32/advanced/microsoft-windows-servercore/docker-compose.yml delete mode 100644 win32/ecosystem/epicmorg/base/microsoft-windows-servercore/docker-compose.yml delete mode 100644 win32/ecosystem/epicmorg/iis/Dockerfile delete mode 100644 win32/ecosystem/epicmorg/iis/docker-compose.yml create mode 100644 win32/ecosystem/microsoft/iis/Dockerfile rename win32/ecosystem/{epicmorg => microsoft}/iis/Makefile (100%) rename win32/ecosystem/{epicmorg => microsoft}/iis/README.md (100%) create mode 100644 win32/ecosystem/microsoft/iis/docker-compose.yml diff --git a/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/Dockerfile b/win32/advanced/microsoft-windows-servercore/Dockerfile similarity index 80% rename from win32/ecosystem/epicmorg/base/microsoft-windows-servercore/Dockerfile rename to win32/advanced/microsoft-windows-servercore/Dockerfile index 038a175e7..fc0cfa86f 100644 --- a/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/Dockerfile +++ b/win32/advanced/microsoft-windows-servercore/Dockerfile @@ -25,7 +25,7 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=true # Disable first time experience ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true # Configure Kestrel web server to bind to port 80 when present -ENV ASPNETCORE_URLS=\ +#ENV ASPNETCORE_URLS=/ # Enable detection of running in a container ENV DOTNET_RUNNING_IN_CONTAINER=true # Enable correct mode for dotnet watch (only mode supported in a container) @@ -60,7 +60,7 @@ RUN powershell -Command \ ################################################################## # install vcredist packages ################################################################## -RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ +RUN choco install -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ visualfsharptools \ vcredist2005 \ vcredist2008 \ @@ -76,7 +76,7 @@ RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot - ################################################################## # install dotnet packages ################################################################## -RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ +RUN choco install -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ dotnetfx \ netfx-4.8-devpack \ dotnet \ @@ -87,23 +87,21 @@ RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot - # Apply patch to provide support for container limits RUN curl -fSLo patch.msu https://download.microsoft.com/download/1/d/1/1d162522-821a-41c6-ba7d-74ff37b0e6c6/Windows10.0-KB9008395-x64-NDP48.msu && \ - mkdir patch&& \ - && expand patch.msu patch -F:* && \ - && del /F /Q patch.msu && \ - && dism /Online /Quiet /Add-Package /PackagePath:C:\EpicMorg\patch\windows10.0-kb9008395-x64-ndp48.cab && \ - && rmdir /S /Q patch && \ + mkdir patch && \ + expand patch.msu patch -F:* && \ + del /F /Q patch.msu && \ + dism /Online /Add-Package /PackagePath:C:\EpicMorg\patch\windows10.0-kb9008395-x64-ndp48.cab && \ + rmdir /S /Q patch + # && \ # Ngen top of assembly graph to optimize a set of frequently used assemblies - && %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" && \ - && %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen update && \ - && %windir%\Microsoft.NET\Framework\v4.0.30319\ngen update - +# %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install /verbose "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" && \ # To optimize 32-bit assemblies, uncomment the next line -# && %windir%\Microsoft.NET\Framework\v4.0.30319\ngen install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" && \ +# %windir%\Microsoft.NET\Framework\v4.0.30319\ngen /verbose install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" && \ ################################################################## # install base packages ################################################################## -RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ +RUN choco install -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ psexec \ curl \ far \ @@ -120,14 +118,13 @@ RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot - steamcmd \ sudo \ tartool \ - unrar \ unzip \ wget ################################################################## # install archive packages ################################################################## -RUN cinst -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ +RUN choco install -y --ignore-checksums --allow-empty-checksums --ignoredetectedreboot --ignore-package-exit-codes \ 7zip \ 7zip-zstd \ 7zip.commandline \ diff --git a/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/Makefile b/win32/advanced/microsoft-windows-servercore/Makefile similarity index 100% rename from win32/ecosystem/epicmorg/base/microsoft-windows-servercore/Makefile rename to win32/advanced/microsoft-windows-servercore/Makefile diff --git a/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/README.md b/win32/advanced/microsoft-windows-servercore/README.md similarity index 100% rename from win32/ecosystem/epicmorg/base/microsoft-windows-servercore/README.md rename to win32/advanced/microsoft-windows-servercore/README.md diff --git a/win32/advanced/microsoft-windows-servercore/docker-compose.yml b/win32/advanced/microsoft-windows-servercore/docker-compose.yml new file mode 100644 index 000000000..b76765d86 --- /dev/null +++ b/win32/advanced/microsoft-windows-servercore/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + app: + image: "epicmorg/win32:2022-core" + build: + context: . diff --git a/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/docker-compose.yml b/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/docker-compose.yml deleted file mode 100644 index f2debda2f..000000000 --- a/win32/ecosystem/epicmorg/base/microsoft-windows-servercore/docker-compose.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: '3.9' -services: - app: - image: "epicmorg/windows-server:2022-base" - isolation: "hyperv" - build: - context: . diff --git a/win32/ecosystem/epicmorg/iis/Dockerfile b/win32/ecosystem/epicmorg/iis/Dockerfile deleted file mode 100644 index db35e8cb6..000000000 --- a/win32/ecosystem/epicmorg/iis/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2022 -LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" -LABEL org.opencontainers.image.vendor="EpicMorg DevTeam, developer@epicm.org" -LABEL org.opencontainers.image.authors="STAM, kasthack, Aleks-Z" -LABEL org.opencontainers.image.source="https://github.com/EpicMorg/docker" -LABEL org.opencontainers.image.url="https://github.com/EpicMorg/docker" -LABEL donate.crypto.TON="EQDvHXRK-K1ZieJhgTD9JZQk7xCnWzRbctYnUkWq1lZq1bUg" -LABEL donate.crypto.ETH="0x26a8443a694f08cdfec966aa6fd72c45068753ec" -LABEL donate.crypto.BTC="bc1querz8ug9asjmsuy6yn4a94a2athgprnu7e5zq2" -LABEL donate.crypto.LTC="ltc1qtwwacq8f0n76fer2y83wxu540hddnmf8cdrlvg" -LABEL donate.crypto.NVC="4SbMynYETyhmKdggu8f38ULU6yQKiJPuo6" -LABEL donate.crypto.DOGE="DHyfE1CZzWtyaQiaMmv6g4KvXVQRUgrYE6" -LABEL donate.crypto.PPC="pQWArPzYoLppNe7ew3QPfto1k1eq66BYUB" -LABEL donate.crypto.RVN="R9t2LKeLhDSZBKNgUzSDZAossA3UqNvbV3" -LABEL donate.crypto.ZEC="t1KRMMmwMSZth8vJcd2ZHtPEFKTQ74yVixE" -LABEL donate.crypto.XMR="884PqZ1gDjWW7fKxtbaeRoBeSh9EGZbkqUyLriWmuKbwLZrAJdYUs4wQxoVfEJoW7LBhdQMP9cFhZQpJr6xvg7esHLdCbb1" - -ENV chocolateyUseWindowsCompression false -# Opt out of the telemetry feature -ENV DOTNET_CLI_TELEMETRY_OPTOUT=true -# Disable first time experience -ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true -# Configure Kestrel web server to bind to port 80 when present -ENV ASPNETCORE_URLS=\ -# Enable detection of running in a container -ENV DOTNET_RUNNING_IN_CONTAINER=true -# Enable correct mode for dotnet watch (only mode supported in a container) -ENV DOTNET_USE_POLLING_FILE_WATCHER=true -# Skip extraction of XML docs - generally not useful within an image/container - helps perfomance -ENV NUGET_XMLDOC_MODE=skip -# PowerShell telemetry for docker image usage -ENV POWERSHELL_DISTRIBUTION_CHANNEL=docker-windows - -#################################################################################################################################### -# https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/manage-windows-dockerfile -#################################################################################################################################### - -################################################################## -# Creating workdir for future -################################################################## -RUN mkdir C:\\EpicMorg -WORKDIR C:\\EpicMorg - -################################################################## -# Installing IIS -################################################################## -RUN powershell -Command Add-WindowsFeature Web-Server; \ - Invoke-WebRequest -UseBasicParsing -Uri "https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.10/ServiceMonitor.exe" -OutFile "C:\ServiceMonitor.exe" - -################################################################## -# Installing ocolatey.org -################################################################## -RUN powershell -Command \ - Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \ - iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - -################################################################## -# install vcredist packages -################################################################## -RUN cinst --no-progress -y -IgnoreChecksums --ignoredetectedreboot \ - vcredist-all \ - vcredist140 \ - vcredist2005 \ - vcredist2008 \ - vcredist2010 \ - vcredist2012 \ - vcredist2013 \ - vcredist2013 \ - vcredist2015 - -################################################################## -# install dotnet packages -################################################################## -RUN cinst --no-progress -y -IgnoreChecksums --ignoredetectedreboot \ - dotnet \ - dotnet-aspnetruntime \ - dotnet-windowshosting \ - dotnet-runtime \ - dotnet-sdk \ - powershell-core - -################################################################## -# install base packages -################################################################## -RUN cinst --no-progress -y -IgnoreChecksums --ignoredetectedreboot \ - curl \ - far \ - findutils \ - git \ - make \ - mc \ - nano \ - openssl \ - sed \ - steamcmd \ - sudo \ - tartool \ - unrar \ - unzip \ - wget - -################################################################## -# install archive packages -################################################################## -RUN cinst --no-progress -y -IgnoreChecksums --ignoredetectedreboot \ - 7zip \ - 7zip-zstd \ - 7zip.commandline \ - 7zip.portable \ - asar7z \ - exfat7z \ - grit7z \ - iso7z \ - modern7z \ - thumbs7z \ - wavpack7z \ - winrar - -EXPOSE 80 - -ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"] \ No newline at end of file diff --git a/win32/ecosystem/epicmorg/iis/docker-compose.yml b/win32/ecosystem/epicmorg/iis/docker-compose.yml deleted file mode 100644 index 21c7c4d0e..000000000 --- a/win32/ecosystem/epicmorg/iis/docker-compose.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: '3.9' -services: - app: - image: "epicmorg/windows-server:base" - build: - context: . diff --git a/win32/ecosystem/microsoft/iis/Dockerfile b/win32/ecosystem/microsoft/iis/Dockerfile new file mode 100644 index 000000000..5dc25a898 --- /dev/null +++ b/win32/ecosystem/microsoft/iis/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/win32:2022-core + +#################################################################################################################################### +# https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/manage-windows-dockerfile +#################################################################################################################################### + +################################################################## +# Creating workdir for future +################################################################## +RUN mkdir C:\\EpicMorg\\bin + +################################################################## +# Installing IIS +################################################################## +RUN powershell -Command Add-WindowsFeature Web-Server ; \ + Add-WindowsFeature Web-Custom-Logging ; \ + Add-WindowsFeature Web-Log-Libraries ; \ + Add-WindowsFeature Web-App-Dev ; \ + Add-WindowsFeature Web-Net-Ext ; \ + Add-WindowsFeature Web-Net-Ext45 ; \ + Add-WindowsFeature Web-AppInit ; \ + Add-WindowsFeature Web-ASP ; \ + Add-WindowsFeature Web-Asp-Net ; \ + Add-WindowsFeature Web-Asp-Net45 ; \ + Add-WindowsFeature Web-CGI ; \ + Add-WindowsFeature Web-ISAPI-Ext ; \ + Add-WindowsFeature Web-ISAPI-Filter ; \ + Add-WindowsFeature Web-Includes ; \ + Add-WindowsFeature Web-WebSockets ; \ + Add-WindowsFeature Web-Mgmt-Tools ; \ + Add-WindowsFeature Web-Mgmt-Compat ; \ + Add-WindowsFeature Web-Metabase ; \ + Add-WindowsFeature Web-Lgcy-Scripting ; \ + Add-WindowsFeature Web-WMI ; \ + Add-WindowsFeature Web-Scripting-Tools ; \ + Add-WindowsFeature Web-Mgmt-Service ; \ + Invoke-WebRequest -UseBasicParsing \ + -Uri "https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.10/ServiceMonitor.exe" \ + -OutFile "C:\EpicMorg\bin\ServiceMonitor.exe" + +RUN powershell -Command Get-WindowsFeature + +EXPOSE 80 443 + +ENTRYPOINT ["C:\\EpicMorg\\bin\\ServiceMonitor.exe", "w3svc"] \ No newline at end of file diff --git a/win32/ecosystem/epicmorg/iis/Makefile b/win32/ecosystem/microsoft/iis/Makefile similarity index 100% rename from win32/ecosystem/epicmorg/iis/Makefile rename to win32/ecosystem/microsoft/iis/Makefile diff --git a/win32/ecosystem/epicmorg/iis/README.md b/win32/ecosystem/microsoft/iis/README.md similarity index 100% rename from win32/ecosystem/epicmorg/iis/README.md rename to win32/ecosystem/microsoft/iis/README.md diff --git a/win32/ecosystem/microsoft/iis/docker-compose.yml b/win32/ecosystem/microsoft/iis/docker-compose.yml new file mode 100644 index 000000000..7b03e0d01 --- /dev/null +++ b/win32/ecosystem/microsoft/iis/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + app: + image: "epicmorg/win32-iis:2022-core" + build: + context: .