close
Skip to content

docker desktop 4.16.0 fails to run sudo in non-root containers #13161

@liayn

Description

@liayn
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: A076DA47-F50C-48FC-80E0-1AA7BB837A27/20230112234856

Actual behavior

docker run -it --rm -u 33:33 drud/ddev-webserver:v1.21.4 sudo ls

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

See also ddev/ddev#4551

Expected behavior

docker run -it --rm -u 33:33 drud/ddev-webserver:v1.21.4 sudo ls
should output the same as
docker run -it --rm -u 33:33 drud/ddev-webserver:v1.21.4 ls

which is:

bin dev healthcheck.sh lib media opt root sbin start.sh tmp var
boot etc home lib64 mnt proc run srv sys usr

Information

  • Windows Version: 10 (also Mac)
  • Docker Desktop Version: 4.16.0
  • WSL2 or Hyper-V backend? WSL2 (but also Hyper-V)
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: no

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

Only a warning about overlapping IPs. No fatal errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions