Well, taking as an example the process I’ve been using:
Usually custom images are generated (from Dockerfiles
) to meet the needs of each application service, such as web services, database server and caching server, from these images, each generating its own container. And the use of Docker-Composer for orchestrating all services, facilitating the set-up of the whole environment.
For practical purposes, in a development environment, mirrored the source code of the application through Volumes of Docker within their respective containers, so each developer runs the build of the images and runs your container, locally, with your version of the project. So theoretically you develop on your machine, but with results being reflected in real time in your container.
For the QA environment, production and the like, the use of an image repository (such as Dockerhub, or a Dockerregistry private) where we no longer mirror the source code in the container, but only embed it within it. The deployment process from there becomes basically a pull, on your server, from the corresponding image.
The great benefit of Docker is the ease of reproducing the same conditions of the production environment on any other machine, but this does not exclude the need for approval environments and this goes from the development process of each project.