Closed tduehr closed 5 years ago
rake-compiler-dock itself should be idempotent. It does not do any changes to the build directory and all changes to the image/container are local to the running session only. So IMHO this is an issue of the given project which uses rake-compiler-dock or possibly an issue of rake-compiler.
I also noticed the build leaving a bunch of junk (bin/ and .bundle) in the source directory.
This is interesting and it is not intended. Could it be, that it was a result of the wrong UID before your change in commit https://github.com/larskanis/rake-compiler-dock/commit/641d47963 ?
I was able to narrow this down some more. This particular error occurs when you change working directories in the docker call after creating the container. I think I may have found a way to clear out this config from the machine but I forget currently. I'll play with it some to narrow that down again.
Also happening for me, the .bundle/config was modified in my working directory after the docker run completed. Confusion ensued as I tried to figure out why Bundler was telling me my development gems were no longer installed :confused: I am on OS X 10.10.4.
I'm going to close this issue, since I think there is no better way to connect rake-compiler-dock to the target project other than mapping the whole project directory into the container. Rake-compiler-dock doesn't do any filesystem modifications, but bundler and project's rake tasks do. So I think it's their responsibility to clean things up before or after the build as necessary.
While debugging OSX support, I can into several situations where the build was expecting a working directory I wasn't currently using:
I also noticed the build leaving a bunch of junk (bin/ and .bundle) in the source directory.
The build process needs to detect failures and clean up. A separate working directory should be used as well.