UPDATE: You can now use the top-level name property in your docker-compose YAML file. This is available from Docker Compose v2.3.3
This is the result of the #745 proposal. An issue which persevered for about 8 years.
Previously:
Right now, we can use the .env
file to set the custom project name like this:
COMPOSE_PROJECT_NAME=SOMEPROJECTNAME
It’s not flexible, but it’s better than nothing. Currently, there is an open issue regarding this as a proposal.