Docker-compose warns when starting a container: Found Orphan Containers

  docker, question

WARNING: Found orphan containers (new, mysql) for this project. If you removed or renamed this service in your compose file, you can run this command with the –remove-orphans flag to clean it up.

I do have two containers, new and mysql, but they are independent of each other and are running normally. I don’t know why this is prompted.

You wrote docker-compose.yml, but the service it describes does not contain your new and mysql, so docker thinks that these two containers are not part of the service and should be cleaned up.