[Moby] Фикс сборки и README

This commit is contained in:
Андрей Казанцев 2025-06-17 22:48:49 +05:00
parent fa7b2748dc
commit 117a9f17f9
2 changed files with 52 additions and 0 deletions

15
Dockerfile Normal file
View File

@ -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

View File

@ -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"
}
```