spring-projects / spring-lifecycle-smoke-tests

24 stars 18 forks source link

Dev container creates gradle caches owned by root #24

Closed dsyer closed 12 months ago

dsyer commented 12 months ago

Running the project in a container using run-dev-container.sh creates files and directories locally with root:root ownership. That then causes havoc when you want to build anything outside the container.

sdeleuze commented 12 months ago

Could you share a bit more about the issue you see? Because I can't reproduce and I don't understand how that's possible since the host .gradle directory is not expected to be mounted by run-dev-container.sh. I see that #23 seems to bind .gradle so maybe double check this is not the reason (and if it is, it should be probably fixed as part of the PR).

dsyer commented 12 months ago

Sorry, yes. I got into a mess with #23. I copied the volume mounts from PetClinic but that one doesn’t run as root so it’s OK. Do we have to run as root here?

sdeleuze commented 12 months ago

To create the checkpoint I suspect we need to, restore should be possible with relevant capabilities. Worth to double check in any case.

dsyer commented 12 months ago

It would be fine to install and use sudo IMO. That’s what the Microsoft devcontainer images do.