mviereck / dockerfile-x11docker-deepin

3D desktop deepin from China
MIT License
33 stars 11 forks source link

Failed to run sudo command in the deepin desktop from the Docker container. #6

Closed hongyi-zhao closed 4 years ago

hongyi-zhao commented 4 years ago

Hi,

I try to use the following command to run the deepin desktop in a Docker container:

$ x11docker --desktop --clipboard --init=systemd -- --cap-add=IPC_LOCK --security-opt seccomp=unconfined -- x11docker/deepin

Then in the deepin desktop, I try to run sudo command but failed. See following for more info:

werner@e7353214c2aa:~/Desktop$ sudo apt-get update
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?

Any hints for this problem?

Regards, HY

mviereck commented 4 years ago

Add option --sudouser to allow su and sudo. Example:

x11docker --desktop --sudouser --clipboard --init=systemd -- --cap-add=IPC_LOCK --security-opt seccomp=unconfined -- x11docker/deepin

The password will be x11docker.

From x11docker --help:

     --sudouser        Allow su and sudo for container user. Use with care,
                       severe reduction of default x11docker security!
                         Password:  x11docker