Docker Community Forums

Share and learn in the Docker community.

PHP Tools - Xdebug, Git

docker

(User10e32) #1

Can Xdebug and git be in different containers then app or should they be in the same container? (Containers are defined in Docker-compose?)

I have read that it is best practice to use different containers for different apps, does that corresponds to Git? Or is it better to use git in host machine?

What are best practices using Xdebug with docker?

I am completely new in docker.


(David Maze) #2

Those tools should be on the host system, where you do your development, and don’t really belong in the container at all.

(A not unreasonable mental picture is that each container is a separate computer and your host system is the router that connects them all to the outside, thinking about the spirit of your original question, and it actually doesn’t make sense to run some of these tools on separate computers / in separate containers.)


(User10e32) #3

Thanks for your reply.
My question is driven by information that I read from “What You Need to Know about Docker” book. It says in there that “Execute only one application process per container. Every time you need a new application, it is best practice to use a new container to run this application in.”