I am pretty relatively new to Docker but I absolutely love how it is designed. I am about to change our project release workflow and I have some questions and I hope some people could share some experiences on what is the best way to go about this.
We use Vagrant to manage development environments. We use a PHP based framework for our projects. My goal is to mimic the live environment on the developer machines as close as possible.
As far as I tried Docker. I could use a CI to create the final container once tests are done that is pushed to our own Docker Hub before release and the server could just fetch the new version of the Container and we can do painless releases. This part is pretty clear for me. This way the source code of a given release is baked into the container.
Although my question is that I do not want the developers to commit Docker images while developing the project. I want them to use Git and use Vagrant and Docker to build the environment locally.
In this case I must have the project source code as a volume ( not part of the container ) to make sure the developers can see real-time edits, debugging etc.
Is there an easy way to achieve this ? Do I need to perhaps use 2 Docker files one Docker file for development environment and one for live release in which the difference is how the source code is managed ?
Any ideas or feedback is appreciated. The key challenge for me is to have a development environment where source code edits and debug is very easy while having the possibility that I can create a final container image containing everything for the shippable software from my CI.
Thanks anyone in advance.