The system cannot open the device or file specified. : 'NuGet-Migrations' for non-root users - 8.0.426-bookworm-slim

Aperta
#7,426 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker

Direzione di ricerca

Compare the 8.0.426-bookworm-slim and 8.0.425-bookworm-slim image definitions and build changes in the repository. Start by locating the Dockerfiles and configuration used for these SDK tags, then reproduce the reported dotnet nuget command with a non-root user and HOME=/tmp. Done when the newer image runs the command successfully for a non-root user.

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

Descrizione

untriaged
Describe the bug

Since the release of 8.0.426-bookworm-slim the following error happens whenever the container is run as a non-root user for any nuget commands e.g.

docker run -u 1000:1000 -e HOME=/tmp -it mcr.microsoft.com/dotnet/sdk:8.0.426-bookworm-slim /bin/bash
I have no name!@8b037b674358:/$ dotnet nuget
System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at NuGet.Common.Migrations.MigrationRunner.Run(String migrationsDirectory)
   at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEn
vironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
I have no name!@8b037b674358:/$

When running as root (default user) this issue does not happen.

Previous versions of the image e.g. 425 release do not have this issue:

 docker run -u 1000:1000 -e HOME=/tmp -it mcr.microsoft.com/dotnet/sdk:8.0.425-bookworm-slim /bin/bash
I have no name!@f29cf18f687a:/$ dotnet nuget
An issue was encountered verifying workloads. For more information, run "dotnet workload update".
NuGet Command Line 6.11.2.1

Usage: dotnet nuget [options] [command]

Options:
  -h|--help  Show help information
  --version  Show version information

Commands:
  add      Add a NuGet source.
  delete   Deletes a package from the server.
  disable  Disable a NuGet source.
  enable   Enable a NuGet source.
  list     List configured NuGet sources.
  locals   Clears or lists local NuGet resources such as http requests cache, packages folder, plugin operations cache  or machine-wide global packages folder.
  push     Pushes a package to the server and publishes it.
  remove   Remove a NuGet source.
  sign     Signs NuGet package(s) at <package-paths> with the specified certificate.
  trust    Manage the trusted signers.
  update   Update a NuGet source.
  verify   Verifies a signed NuGet package.

Use "dotnet nuget [command] --help" for more information about a command.

I have no name!@f29cf18f687a:/$
Which .NET image(s) are you using?

Broken: mcr.microsoft.com/dotnet/sdk:8.0.426-bookworm-slim
Working: mcr.microsoft.com/dotnet/sdk:8.0.425-bookworm-slim

Steps to reproduce

See description

Other information

N/A

Output of docker version
docker version
Client: Docker Engine - Community
 Version:           29.9.1
 API version:       1.56
 Go version:        go1.26.9
 Git commit:        dfc520d
 Built:             Wed Oct 14 18:34:39 2026
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.9.1
  API version:      1.56 (minimum version 1.40)
  Go version:       go1.26.9
  Git commit:       b26fb77
  Built:            Wed Oct 14 18:32:00 2026
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.2.4
  GitCommit:        193637f7ee8ae5f5aa5248f49e7baa3e6164966e
 runc:
  Version:          1.3.5
  GitCommit:        v1.3.5-0-g488fc13e
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
Output of docker info
docker info
Client: Docker Engine - Community
 Version:    29.9.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 14
 Server Version: 29.9.1
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 193637f7ee8ae5f5aa5248f49e7baa3e6164966e
 runc version: v1.3.5-0-g488fc13e
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 4.18.0-553.58.1.el8_10.x86_64
 Operating System: Red Hat Enterprise Linux 8.10 (Ootpa)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.32GiB
 Name: us01vldvjnkag01.saas-n.com
 ID: 307cef16-7c2c-45e8-91fd-a30b5b03df0c
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: REDACTED
 HTTPS Proxy: REDACTED
 No Proxy: REDACTED
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
  ::1/128
 Live Restore Enabled: false
 Firewall Backend: iptables
  EnableUserlandProxy: true
  UserlandProxyPath: /usr/bin/docker-proxy
Lingua principale
Dockerfile
Stelle
4.9k
Fork
2k
Merge medio
1g 17h
PR unite (30g)
58

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 dotnet/dotnet-docker

Tutte le issue di dotnet/dotnet-docker

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.