Adding Solid Docker Compose Recipes

Ok guys so I found that when you use volumes in docker-compose your create some side effects that could result in problems.

When you use the volume and pull everything from your project root directory you are overloading the content of the compiled stuff in your container so some dependencies won’t be “accessible” as their dependencies need to be compiled in order to work correctly.

Off course correct me if i’m wrong.

From my initial post I had a .docker folder that contains the necessary Dockerfile for my image with a setup shell script and in my project root directory I had my docker-compose file that was pulling all the project and target the project folder in my container.

Now I moved out my dockerfile in my project root directory because I canot copy files from a parent path of the context and even if it’s logic I do not really get how to keep my dockerfile in the docker folder, this is not much but I was usually using volumes in my compose files also to pull the source code even after a change. I’m also a little bit confused because this mean that at every change you need to rebuild the project, that’s a time waste.

At least you could only copy your mix.deps files and compile them but if you’re still using volumes you will override the deps and _build folder. For now I’m staying with this approach but do not hesitate to share your reviews !

The almighty @NobbZ explained very well all the side effects that this would cause and how a container should really behave: here.

Thanks a lot man !