pnoltes commented on PR #731:
URL: https://github.com/apache/celix/pull/731#issuecomment-2242691970

   > @pnoltes I just tested this with Fedora + podman + CLion and at least for 
me this doesn't seem to work.
   > 
   > The steps I executed:
   > 
   > ```shell
   > [rlenferink@fedora .devcontainer]$ git checkout feature/devcontainer
   > [rlenferink@fedora .devcontainer]$ cd .devcontainer
   > [rlenferink@fedora .devcontainer]$ ./build-devcontainer-image.sh
   > <snip>
   > [rlenferink@fedora .devcontainer]$ ./run-devcontainer.sh 
   > Do you want to mount the .gnupg directory to the container (as an 
overlayfs)? (yes/no): n
   > Do you want to mount the .gitconfig file to the container (as read-only)? 
(yes/no): no
   > Do you want to forward the SSH agent to the container? (yes/no): no
   > Starting container 'celixdev' with command: sudo /usr/sbin/sshd -D -e -p 
2233
   > 5a9d8ba9ffb813252bd6e77e67e97ad9da07ce364687e1e9a0e09ffbf8cc49dc
   > 
   > Do you want to build Celix dependencies with Conan? (yes/no): no
   > Done. You can connect with ssh using 'ssh -p 2233 celixdev@localhost' and 
password 'celixdev'
   > ```
   > 
   > Then, using CLion to connect via SSH to the container succeeds, but 
editing files is impossible, since the files are marked as read-only.
   > 
   > Entering the container the error is indeed correct, since the rootless 
`celixdev` user is not allowed to write to the mounted volume.
   > 
   > ```shell
   > [rlenferink@fedora .devcontainer]$ podman exec -it celixdev bash
   > celixdev@fedora:~/workspace$ touch test
   > touch: cannot touch 'test': Permission denied
   > celixdev@fedora:~/workspace$ ls -al
   > total 240
   > drwxr-xr-x. 1 rlenferink users       532 Jul 11 18:33 .
   > drwxr-x---. 1 celixdev   celixdev     66 Jul 11 18:43 ..
   > -rw-r--r--. 1 rlenferink users      2182 Jan  7  2024 .asf.yaml
   > -rw-r--r--. 1 rlenferink users      1616 Jan  7  2024 .clang-format
   > drwxr-xr-x. 1 rlenferink users       448 Jul 11 18:33 .devcontainer
   > drwxr-xr-x. 1 rlenferink users       226 Jul 11 18:33 .git
   > drwxr-xr-x. 1 rlenferink users        18 Jul 17  2022 .github
   > -rw-r--r--. 1 rlenferink users       949 Jan  7  2024 .gitignore
   > -rw-r--r--. 1 rlenferink users       988 Jan  7  2024 .gitpod.yml
   > drwxr-xr-x. 1 rlenferink users       146 Jan  7  2024 .idea
   > -rw-r--r--. 1 rlenferink users       534 Mar  7  2021 BUILDING
   > -rw-r--r--. 1 rlenferink users     22338 Jul 11 18:33 CHANGES.md
   > -rw-r--r--. 1 rlenferink users      9720 Jul 11 18:33 CMakeLists.txt
   > -rw-r--r--. 1 rlenferink users    107822 Apr 27  2023 Doxyfile
   > -rw-r--r--. 1 rlenferink users     11273 Mar  7  2021 KEYS
   > -rw-r--r--. 1 rlenferink users     18766 Jan  7  2024 LICENSE
   > -rw-r--r--. 1 rlenferink users       169 Jul 11 18:33 NOTICE
   > -rw-r--r--. 1 rlenferink users     10241 Jul 11 18:33 README.md
   > drwxr-xr-x. 1 rlenferink users       278 Jan  7  2024 build
   > drwxr-xr-x. 1 rlenferink users       206 Jul 11 18:33 bundles
   > drwxr-xr-x. 1 rlenferink users       250 Jul 11 18:33 cmake
   > drwxr-xr-x. 1 rlenferink users       196 Jan  7  2024 cmake-build-debug
   > drwxr-xr-x. 1 rlenferink users       196 Jan  7  2024 
cmake-build-relwithdebinfo
   > -rw-r--r--. 1 rlenferink users       845 Jul 11 18:33 codecov.yml
   > -rw-r--r--. 1 rlenferink users     17174 Jul 11 18:33 conanfile.py
   > drwxr-xr-x. 1 rlenferink users        28 Apr 27  2023 doap
   > drwxr-xr-x. 1 rlenferink users       424 Jul 11 18:33 documents
   > drwxr-xr-x. 1 rlenferink users       134 Sep 23  2023 examples
   > drwxr-xr-x. 1 rlenferink users       164 Jan  7  2024 libs
   > drwxr-xr-x. 1 rlenferink users        60 Jul 17  2022 misc
   > -rw-r--r--. 1 rlenferink users      1665 Jan  7  2024 rat-excludes.txt
   > ```
   > 
   > Am I doing something wrong here?
   
   I don't see anything wrong in your approach. The docker/podman run commands 
uses the `--userns=keep-id` argument, which should correctly map the celixdev 
user to the host user.
   
   I'll retest this, but it may take some time before I can get to it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to