[BUG] docker compose config
does not provide validation logic for complete project when individual compose file has profiles
mentioned it
#12499
Labels
Description
validation of a compose file(s) provides invalid output when performing
docker compose config
on the complete project as well as on individual files. This bug makes it not possible whether the docker compose files / project is actually valid or not.Steps To Reproduce
Following is the test structure:
bug-dc-profiles . ├── compose.yml ├── docker-compose.test1.yml └── docker-compose.test.yml
Contents with
profiles
specifiedprofile names are only for testing purpose and bear no real utility in this example
docker-compose.test.yml
docker-compose.test1.yml
compose.yml
(entrypoint file)Testing with
profiles
> docker compose config name: bug-dc-profiles services: {}
testing it with individual files:
Content without
profiles
removing
profiles
from either one of the file provides a configuration validation but with only the contents of the file where those profiles were removed.docker-compose.test1.yml
docker-compose.test.yml
remains the same as beforeTesting without
profiles
as seen here only the
test-cntr-2
is validated.removing
profiles
from all the files gives the accurate output:Compose Version
Docker Environment
Anything else?
docker compose config --profiles
lists out the profiles, butdocker compose config --services
does not provide anything.Only when the
profiles
are removed doesdocker compose config --services
lists the values of the services.only was to resolve this solution is
docker compose --profile test-debug-prof config
provides the configuration of the specific file.The text was updated successfully, but these errors were encountered: