A few years ago, I wrote a simple web application in PHP without a database. Until now, it was running on a basic Apache server. I'm not a professional developer; I'm more on the system side.
I haven't had the chance to work on contracts with DevOps infrastructures yet. To better understand containers' operation and benefits, I tried to replicate an infrastructure (very simplified version) as if I were in a company, and this application had to go through development, testing, and production stages. I rented a CentOS VPS for the production environment, a Debian VPS for the testing environment, and used my personal Windows PC as the development environment. In the diagram below, I also added another development environment as if another developer were working on the project. I connected all of this to Github and Docker Hub.
I have a question regarding image creation. Once I've developed my code and tested it locally with an apache php docker container, I create a Docker image with the code embedded in it. I create this image using a Dockerfile on my development machine. I push this image to Docker Hub and use it for the testing and production environments.
In real life, I doubt that the image is created from the development machines. So, where should it be created from?
Any guidance or thoughts would be much appreciated. This is new territory for me.
Note: I do have proxies and multiple sites on servers but I removed them from the diagram to simplified the question.