Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Windows Docker image fails to run

Aperta
#6,347 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
docker

Direzione di ricerca

Riproduci il flusso di creazione dell’immagine in tre passaggi e i successivi comandi docker run su Docker Desktop for Windows, registrando se si verifica l’errore hcs::System::CreateProcess. Confronta l’entrypoint predefinito con gli override segnalati; il lavoro è completato quando l’immagine Windows sottoposta a commit si avvia correttamente senza l’errore 0x2 di file non trovato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
6.1k
Fork
2.2k
Merge medio
1g 10h
PR unite (30g)
47

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docker/cli

Tutte le issue di docker/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.