Compose spec says that top-level name
MUST be exposed for interpolation, but it isn't
#9530
Labels
name
MUST be exposed for interpolation, but it isn't
#9530
Description
According to the Compose spec:
In my
compose.yaml
file, I want to customize how the project name is formatted in the names of my containers. To accomplish this, I write acompose.yaml
file something like this:When I run
docker compose up
, I get the following:Steps to reproduce the issue:
compose.yaml
file in the same manner I did above.docker compose up
.Describe the results you received:
Docker tells me that the
COMPOSE_PROJECT_NAME
variable is not set, but according to the spec my top-levelname
property should have been used as the value for this variable. Unless I'm not interpreting it correctly.Describe the results you expected:
The
COMPOSE_PROJECT_NAME
variable was set tosome_name
and I get a container calledsome_name_database
.Additional information you deem important (e.g. issue happens only occasionally):
Nothing.
Output of
docker compose version
:Output of
docker info
:Additional environment details:
I'm on a macOS with an M1 Mac, although that probably doesn't matter in this case.
The text was updated successfully, but these errors were encountered: