Interview Prep/Docker/Docker Compose

How does Compose choose the project name and why does it matter?

IntermediateConceptDocker Compose
Answer

Default is the directory name; override with -p, COMPOSE_PROJECT_NAME or name: in the file. Resource names (myproj_default, myproj_pgdata, myproj-web-1) are prefixed with it, so two checkouts with the same directory name collide.

All Docker questions Roadmap: Docker & containers

More on Docker Compose