I'm trying to set up fixuid as a solution for the user permission problem described in CPP-27415. I'm able to get fixuid to work as expected if I manually run a Docker image, but not when using that image as a CLion toolchain. I have a GitHub project that demonstrates this.
When fixuid runs, the Docker container user is modified to set its UID and GID to match the values the container is being run with. fixuid then modifies file permissions in the container to match the new UID and GID, and sets $HOME. fixuid also creates a touch file when it runs. The sample project application displays user information to verify that fixuid worked (or not).
I cannot figure out how CLion is running a Docker a toolchain. The fixuid documentation suggests using an ENTRYPOINT to run the command, but it seems that CLion overrides this when it runs an image. The fixuid command can also be run in a container start-up script, so I placed this command in the toolchain environment script (clion-env.sh in the demo project). When I use this toolchain with CLion, fixuid is not working correctly. I can tell that it's being run as part of the start-up script because $HOME is being set correctly. However, the UID and GID of the container user are not being updated, and the fixuid touch file is not present.
As I said above, this all works as expected if I manually run a container (see docker-compose.yml in the sample project for the run settings). How does CLion run its toolchain containers?