I am sure this is a quite simple question, but for some reason, I cannot find a definitive answer for it.
I have a local docker environment with php-fpm and nginx. Locally I am running it through docker-compose and part docker-compose.yml looks like this:
Where I am mounting the folder with a code to my host and developing on it.
So, in the end of a day, there is no code residing on php container itself.
The question I have is related to the actual deployment to multi docker environment on elastic beanstalk.
Since I need to bundle everything into one archive, does it mean that I need to bundle it with the code as well in order to mount it in the same way as I do locally.
Of coarse, there is an option to build an image with the code in it, but then I am kind of going against the whole docker idea. Also, I will have problems mounting the code to both containers.
That is the best practices in this case?