diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d3eba82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2019 + +RUN curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe \ + && (start /w vs_buildtools.exe \ + --quiet --wait --norestart --nocache \ + --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" \ + --noUpdateInstaller \ + --add Microsoft.Component.MSBuild \ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \ + --add Microsoft.VisualStudio.Component.VC.DiagnosticTools \ + --add Microsoft.VisualStudio.Component.Windows11SDK.22261 \ + --add Microsoft.VisualStudio.Component.VC.Redist.14.latest \ + --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core \ + || IF "%ERRORLEVEL%"=="3010" EXIT 0) \ + && del /q vs_buildtools.exe \ No newline at end of file diff --git a/README.md b/README.md index b4917a4..5cb2996 100644 --- a/README.md +++ b/README.md @@ -67,4 +67,41 @@ Server: docker pull mcr.microsoft.com/windows/servercore:ltsc2025 docker pull mcr.microsoft.com/windows/servercore:ltsc2022 docker pull mcr.microsoft.com/windows/servercore:ltsc2019 +``` + +5. Для подготовки базового образа сборка должна быть на `ltsc2019` со следующими параметрами: +``` +FROM mcr.microsoft.com/windows/servercore:ltsc2019 + +RUN curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe \ + && (start /w vs_buildtools.exe \ + --quiet --wait --norestart --nocache \ + --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" \ + --noUpdateInstaller \ + --add Microsoft.Component.MSBuild \ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \ + --add Microsoft.VisualStudio.Component.VC.DiagnosticTools \ + --add Microsoft.VisualStudio.Component.Windows11SDK.22261 \ + --add Microsoft.VisualStudio.Component.VC.Redist.14.latest \ + --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core \ + || IF "%ERRORLEVEL%"=="3010" EXIT 0) \ + && del /q vs_buildtools.exe +``` + +6. В случае ошибки по `hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3)` +требуется выполнить конфигурацию `dockerd` в `%programdata%\docker\config\daemon.json` + +Пример: +``` +{ +"hosts": [ + "npipe://" + ], +"experimental": false, +"storage-opts": [ +"size=300GB" +], +"data-root": "D:\\docker-root" +} + ``` \ No newline at end of file