Closed cuphi closed 1 year ago
Docker is not creating a user when creating lsmith_lsmith resulting in root access to the filesystem. laz@kerchunk:~/store/Lsmith> ls -hal total 164K drwxr-xr-x 12 laz users 4.0K Feb 18 17:07 . drwxr-xr-x 10 laz users 4.0K Feb 18 14:45 .. -rw-r--r-- 1 laz users 94 Feb 18 14:45 .dockerignore drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 .git drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 .github -rw-r--r-- 1 laz users 165 Feb 18 14:45 .gitignore -rw-r--r-- 1 laz users 128 Feb 18 14:45 .gitmodules -rw-r--r-- 1 laz users 128 Feb 18 14:45 .pre-commit-config.yaml -rw-r--r-- 1 laz users 7 Feb 18 15:32 .python-version -rw-r--r-- 1 laz users 12K Feb 18 14:45 LICENSE drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 api -rw-r--r-- 1 laz users 705 Feb 18 14:45 build.py drwxr-xr-x 2 laz users 4.0K Feb 18 14:45 docker -rw-r--r-- 1 laz users 467 Feb 18 14:45 docker-compose.yml drwxr-xr-x 4 root root 4.0K Feb 18 17:16 docker-data drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 docs drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 frontend -rw-r--r-- 1 laz users 113 Feb 18 14:45 launch-user.bat -rw-r--r-- 1 laz users 153 Feb 18 14:45 launch-user.sh -rw-r--r-- 1 laz users 2.0K Feb 18 14:45 launch.bat -rw-r--r-- 1 laz users 6.8K Feb 18 14:45 launch.py -rwxr-xr-x 1 laz users 1.4K Feb 18 14:45 launch.sh drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 lib drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 modules -rw-r--r-- 1 laz users 437 Feb 18 14:45 package.json -rw-r--r-- 1 laz users 106 Feb 18 14:45 pyproject.toml -rw-r--r-- 1 laz users 4.2K Feb 18 14:45 readme.md -rw-r--r-- 1 laz users 352 Feb 18 14:45 requirements.txt drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 submodules -rw-r--r-- 1 laz users 30K Feb 18 14:45 yarn.lock
laz@kerchunk:~/store/Lsmith> ls -hal total 164K drwxr-xr-x 12 laz users 4.0K Feb 18 17:07 . drwxr-xr-x 10 laz users 4.0K Feb 18 14:45 .. -rw-r--r-- 1 laz users 94 Feb 18 14:45 .dockerignore drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 .git drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 .github -rw-r--r-- 1 laz users 165 Feb 18 14:45 .gitignore -rw-r--r-- 1 laz users 128 Feb 18 14:45 .gitmodules -rw-r--r-- 1 laz users 128 Feb 18 14:45 .pre-commit-config.yaml -rw-r--r-- 1 laz users 7 Feb 18 15:32 .python-version -rw-r--r-- 1 laz users 12K Feb 18 14:45 LICENSE drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 api -rw-r--r-- 1 laz users 705 Feb 18 14:45 build.py drwxr-xr-x 2 laz users 4.0K Feb 18 14:45 docker -rw-r--r-- 1 laz users 467 Feb 18 14:45 docker-compose.yml drwxr-xr-x 4 root root 4.0K Feb 18 17:16 docker-data drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 docs drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 frontend -rw-r--r-- 1 laz users 113 Feb 18 14:45 launch-user.bat -rw-r--r-- 1 laz users 153 Feb 18 14:45 launch-user.sh -rw-r--r-- 1 laz users 2.0K Feb 18 14:45 launch.bat -rw-r--r-- 1 laz users 6.8K Feb 18 14:45 launch.py -rwxr-xr-x 1 laz users 1.4K Feb 18 14:45 launch.sh drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 lib drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 modules -rw-r--r-- 1 laz users 437 Feb 18 14:45 package.json -rw-r--r-- 1 laz users 106 Feb 18 14:45 pyproject.toml -rw-r--r-- 1 laz users 4.2K Feb 18 14:45 readme.md -rw-r--r-- 1 laz users 352 Feb 18 14:45 requirements.txt drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 submodules -rw-r--r-- 1 laz users 30K Feb 18 14:45 yarn.lock
Not the owner and group of the docker-data folder above. To fix this simply have the docker file create a new user:
docker-data
https://stackoverflow.com/questions/50317119/docker-container-creating-directories-owned-by-root-i-need-them-owned-by-10001
Install the Docker container for this project. It is 100% reproducible.
To run as the local, logged in user and not have root privileges.
Python 3.10.7 OpenSuse Leap 15.4 Current release
No response
Closing this issue as the project has been significantly updated. Please reopen if you still have problems.
Describe the bug
Docker is not creating a user when creating lsmith_lsmith resulting in root access to the filesystem.
laz@kerchunk:~/store/Lsmith> ls -hal total 164K drwxr-xr-x 12 laz users 4.0K Feb 18 17:07 . drwxr-xr-x 10 laz users 4.0K Feb 18 14:45 .. -rw-r--r-- 1 laz users 94 Feb 18 14:45 .dockerignore drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 .git drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 .github -rw-r--r-- 1 laz users 165 Feb 18 14:45 .gitignore -rw-r--r-- 1 laz users 128 Feb 18 14:45 .gitmodules -rw-r--r-- 1 laz users 128 Feb 18 14:45 .pre-commit-config.yaml -rw-r--r-- 1 laz users 7 Feb 18 15:32 .python-version -rw-r--r-- 1 laz users 12K Feb 18 14:45 LICENSE drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 api -rw-r--r-- 1 laz users 705 Feb 18 14:45 build.py drwxr-xr-x 2 laz users 4.0K Feb 18 14:45 docker -rw-r--r-- 1 laz users 467 Feb 18 14:45 docker-compose.yml drwxr-xr-x 4 root root 4.0K Feb 18 17:16 docker-data drwxr-xr-x 9 laz users 4.0K Feb 18 14:45 docs drwxr-xr-x 4 laz users 4.0K Feb 18 14:45 frontend -rw-r--r-- 1 laz users 113 Feb 18 14:45 launch-user.bat -rw-r--r-- 1 laz users 153 Feb 18 14:45 launch-user.sh -rw-r--r-- 1 laz users 2.0K Feb 18 14:45 launch.bat -rw-r--r-- 1 laz users 6.8K Feb 18 14:45 launch.py -rwxr-xr-x 1 laz users 1.4K Feb 18 14:45 launch.sh drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 lib drwxr-xr-x 5 laz users 4.0K Feb 18 14:45 modules -rw-r--r-- 1 laz users 437 Feb 18 14:45 package.json -rw-r--r-- 1 laz users 106 Feb 18 14:45 pyproject.toml -rw-r--r-- 1 laz users 4.2K Feb 18 14:45 readme.md -rw-r--r-- 1 laz users 352 Feb 18 14:45 requirements.txt drwxr-xr-x 3 laz users 4.0K Feb 18 14:45 submodules -rw-r--r-- 1 laz users 30K Feb 18 14:45 yarn.lock
Not the owner and group of the
docker-data
folder above. To fix this simply have the docker file create a new user:https://stackoverflow.com/questions/50317119/docker-container-creating-directories-owned-by-root-i-need-them-owned-by-10001
Reproduction
Install the Docker container for this project. It is 100% reproducible.
Expected behavior
To run as the local, logged in user and not have root privileges.
System Info
Python 3.10.7 OpenSuse Leap 15.4 Current release
Additional context
No response
Validations