codeclimate-cppcheck icon indicating copy to clipboard operation
codeclimate-cppcheck copied to clipboard

Fails to write files to mounted src code volume

Open alexdelifer opened this issue 3 years ago • 1 comments

Since the container is running as app it doesn't have permissions to write .dump files to the code volume.

This means new features like --addon and --dump do not work properly until this is fixed.

This would fix #41 and would allow for addon: misra.py to work

alexdelifer avatar Jan 20 '23 13:01 alexdelifer

seems like the codeclimate cli tool forces the user to be 9000:9000 I wrote a entrypoint.sh that creates a app user and appgroup group, chmods and chowns, all for it to be blocked by some hardcoded args.

I also don't think it's possible for the codeclimate containers to output to the /code volume since it's mounted :ro during execution.

D, [2023-01-20T14:54:50.938946 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-cppcheck-stable-8c0b7bbd-901b-4af0-bdbd-f18d7fd0b8e4", "--cap-drop", "all", "--label", "com.codeclimate.label=e0eb9463-85f9-4f79-be2a-a80b3e346c3b", "--log-driver", "none", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "/home/alex/src/oneplannershoulder:/code:ro", "--volume", "/tmp/cc/61305620-0089-488e-9529-fd813b4b3592:/config.json:ro", "--user", "9000:9000", "--memory", "1024000000", "codeclimate/codeclimate-cppcheck"]

too bad, will investigate another time.

alexdelifer avatar Jan 20 '23 14:01 alexdelifer