Skip to content

Docker Desktop 4.16.0 can't use sudo inside container (nosuid base filesystem?) #6675

Description

@rfay
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 165EF212-DB99-4FE1-90A4-E516A309B23F/20230112235925

Expected behavior

sudo inside container should be possible to use

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?

Information

  • macOS Version: 13.1 Ventura
  • Intel chip or Apple chip: Both (and Windows)
  • Docker Desktop Version: 4.16.0

Steps to reproduce the behavior

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

This same thing happens on Docker Desktop for Windows, both from Traditional Windows and WSL2, reported in

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