Interview Prep/Docker/Networking, DNS and Compose

`docker compose up` creates new network every time and `docker network ls` is full of them.

BeginnerTroubleshootingNetworking, DNS and Compose
Answer

Likely causes → Changing project name (-p, directory names, COMPOSE_PROJECT_NAME) between runs, or CI jobs leaving networks behind.

Diagnose → docker network ls --filter label=com.docker.compose.project.

Fix → Use docker compose down in cleanup; docker network prune; fix the project name.

Prevent → Set name: at the top of compose.yaml.

All Docker questions Roadmap: Docker & containers

More on Networking, DNS and Compose