Can you actually define the project name inside the compose configuration file itself, rather than as an environment variable or command-line flag? I suspect it may avoid some trouble in some scenarios.
I guess overriding that name might still be possible by env or flag.
In docker-compose, you can do this by setting the “container_name” property on any of your containers.
When a container is created using Docker, Docker provides a way to name the container using the the --name <container_name> flag. However, if no name is provided by the user while creating/running a Docker container, Docker automatically assigns the container a name.
The Compose file is a YAML file defining services, networks, and volumes for a Docker application. The latest and recommended version of the Compose file format is defined by the Compose Specification.
The default path for a Compose file is ./docker-compose.yml .
Not yet (as of version 1.6.2), however, it is being discussed https://github.com/docker/compose/issues/745
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With