Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Windows Docker image fails to run

Đang mở
#6,347 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker
Lĩnh vực
cli, operating-systems

Hướng nghiên cứu

Tái hiện quy trình tạo image gồm ba bước và các lệnh docker run tiếp theo trên Docker Desktop for Windows, ghi lại xem lỗi hcs::System::CreateProcess có xảy ra hay không. So sánh entrypoint mặc định với các override được báo cáo; hoàn tất khi image Windows đã commit khởi động thành công mà không gặp lỗi 0x2 không tìm thấy tệp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

kind/bug platform/windows status/0-triage status/more-info-needed
Description

I have a Windows Docker image that I try to run using Docker Desktop for Windows. This image was created in three steps:

  1. 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.bat to create a base image (will be used as a base for other images too)
  2. Execute the command docker container commit vsbuildtools_install_container my_tag
  3. Do a docker build using a Dockerfile that 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.

Ngôn ngữ chính
Go
Star
6.1k
Fork
2.2k
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
47

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của docker/cli

Tất cả issue của docker/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.