-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot change user group id, restart again and again #1
Comments
Hello, |
at your convenience this project is so great and wonderful. my sincerely gratitude! |
It's corrected in the release 20.06. |
This is how you can test that it's working. First you can pull the lab variation of the image:
You can rename it, for example, to chenzilin/cubuntu-xfce4-dev-docker:v3.0:
Then you can run you script, which will start the container ubuntu-xfce4-dev-docker_chenzilin in the background:
After checking that it's still running by using
you can connect to it interactively
and check the user and group IDs (note that the instance ID in the prompt will be different each time)
There is also a simpler way, if you only want to check the user and group IDs. You can use a temporary container which will be automatically removed:
You should get the following output:
|
FROM accetto/xubuntu-vnc-novnc:lab-ubuntu18.04.4
$ cat ubuntu-xfce4-dev-docker_chenzilin.sh
#!/bin/bash
sudo docker run -d
-p 14901:22
-p 15901:5901
-p 16901:6901
--user 1000:1000
--restart=always
--name ubuntu-xfce4-dev-docker_chenzilin
ubuntu-xfce4-dev-docker:v3.0
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
398b336c7714 ubuntu-xfce4-dev-docker:v3.0 "/tini -- /dockersta…" 3 minutes ago Restarting (1) 56 seconds ago ubuntu-xfce4-dev-docker_chenzilin
$ sudo docker logs 398b336c7714
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
cp: cannot create regular file '/etc/passwd': Permission denied
when use --user 1000, it's OK
when use --user 1000:1000, restart again and again
The text was updated successfully, but these errors were encountered: