79145503

Date: 2024-10-31 16:23:24
Score: 0.5
Natty:
Report link

I finally found a solution for this problem.

In CLion under Settings > Build, Execution, Deployment > Toolchains add to the Container settings the Option --user=0.

With this option the command will be run as the root user in the container. Because Docker Desktop runs as the normal user the root user in the Container will be mapped to the host user.

After adding this setting CLion found automatically the paths to the compiler in the Docker container and building works without any permission issues. Also the files in the build directory are owned by my host user.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: TheName