Windows Docker image fails to run
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker
- 领域
- cli, operating-systems
调研方向
在 Docker Desktop for Windows 上重现三步镜像创建流程以及后续的 docker run 命令,并记录是否发生 hcs::System::CreateProcess 错误。比较默认 entrypoint 与报告中的覆盖项;已提交的 Windows 镜像能够在不出现 0x2 文件未找到错误的情况下成功启动,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Description
I have a Windows Docker image that I try to run using Docker Desktop for Windows. This image was created in three steps:
- Execute the command
docker run -i --name vsbuildtools_install_container -v %CD%:C:\InstallSource -w C:\InstallSource mcr.microsoft.com/dotnet/framework/sdk:4.8.1-windowsservercore-ltsc2022 cmd /c Install.batto create a base image (will be used as a base for other images too) - Execute the command
docker container commit vsbuildtools_install_container my_tag - Do a
docker buildusing aDockerfilethat copies some additional files into the image with the tag from step 2.
The Install.bat of step 1 just executes the following command:
layout\vs_BuildTools --noWeb --quiet --wait --norestart --nocache --installPath C:\BuildTools --config dependencies\VS2022.config || IF "%ERRORLEVEL%"=="3010" EXIT 0
This will install Visual Studio 2022 based on a previously downloaded offline installer.
Now when I run the image my_tag with the command docker run -ti my_tag I get the following error:
docker: Error response from daemon: container 88c1500d02763339d365a78c83410186664b892ceff6ec0806f829f19461e365 encountered an error during hcs::System::CreateProcess: C:\TEMP\entrypoint.cmd type C:\TEMP\README: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF76E6AF5AD: (caller: 00007FF76E654C97) Exception(2) tid(3c8) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000]
Also when I try to override the entrypoint with an additional --entrypoint "cmd /c cmd" or by adding cmd /c cmd after the tag name, I still get the same error, except for the first line where C:\TEMP\entrypoint.cmd is replaced by cmd /c cmd.
Reproduce
See above
Expected behavior
The image just runs
docker version
Client:
Version: 28.3.2
API version: 1.51
Go version: go1.24.5
Git commit: 578ccf6
Built: Wed Jul 9 16:12:31 2025
OS/Arch: windows/amd64
Context: desktop-windows
Server: Docker Desktop 4.44.2 (202017)
Engine:
Version: 28.3.2
API version: 1.51 (minimum version 1.24)
Go version: go1.24.5
Git commit: e77ff99
Built: Wed Jul 9 15:41:13 2025
OS/Arch: windows/amd64
Experimental: false
docker info
Client:
Version: 28.3.2
Context: desktop-windows
Debug Mode: false
Plugins:
ai: Docker AI Agent - Ask Gordon (Docker Inc.)
Version: v1.9.11
Path: C:\Program Files\Docker\cli-plugins\docker-ai.exe
buildx: Docker Buildx (Docker Inc.)
Version: v0.26.1-desktop.1
Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe
cloud: Docker Cloud (Docker Inc.)
Version: v0.4.18
Path: C:\Program Files\Docker\cli-plugins\docker-cloud.exe
compose: Docker Compose (Docker Inc.)
Version: v2.39.1-desktop.1
Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.42
Path: C:\Program Files\Docker\cli-plugins\docker-debug.exe
desktop: Docker Desktop commands (Docker Inc.)
Version: v0.2.0
Path: C:\Program Files\Docker\cli-plugins\docker-desktop.exe
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.29
Path: C:\Program Files\Docker\cli-plugins\docker-extension.exe
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: C:\Program Files\Docker\cli-plugins\docker-init.exe
mcp: Docker MCP Plugin (Docker Inc.)
Version: v0.13.0
Path: C:\Program Files\Docker\cli-plugins\docker-mcp.exe
model: Docker Model Runner (EXPERIMENTAL) (Docker Inc.)
Version: v0.1.36
Path: C:\Program Files\Docker\cli-plugins\docker-model.exe
offload: Docker Offload (Docker Inc.)
Version: v0.4.18
Path: C:\Users\vgm1bda\.docker\cli-plugins\docker-offload.exe
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: C:\Program Files\Docker\cli-plugins\docker-sbom.exe
scout: Docker Scout (Docker Inc.)
Version: v1.18.2
Path: C:\Program Files\Docker\cli-plugins\docker-scout.exe
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 62
Server Version: 28.3.2
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 22631 (22621.1.amd64fre.ni_release.220506-1250)
Operating System: Microsoft Windows Version 23H2 (OS Build 22631.5768)
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 31.71GiB
Name: BOX-C-000J5
ID: 2594620a-b8f2-4ce4-a32a-4aee39b867f2
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Labels:
com.docker.desktop.address=npipe://\\.\pipe\docker_cli
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Additional Info
I have tried a lot of times to install Visual Studio via a Docker file, but our corporate proxies and other network settings let that fail every time (either with network timeouts, or just no installation). That is why I tried to do it the unconventional way with running an install script inside a container and then commit that container to tag it.
- 主要语言
- Go
- 星标
- 6.1k
- 派生
- 2.2k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 45
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
kind/bug status/0-triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
kind/bug status/0-triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
kind/feature status/0-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
相似的 Issue
-
area/proxy kind/bug priority/backlog triage/accepted
难度 2/5 1-3 小时 新手友好度 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
维护者通常 1 天内回复
-
area:chat bug sev:papercut
难度 2/5 1-3 小时 新手友好度 86/100
Agent-Field/CodeAF#1592 ·
维护者通常 1 天内回复
-
kind/bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 7 天内回复
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug P2 reliability
难度 2/5 1-3 小时 新手友好度 88/100
afreidah/s3-orchestrator#1564 ·
维护者通常 1 天内回复