Description
I discovered that commented out yaml that contain env vars in the comment do get parsed in RC1. This seems to be a bug introduced by the recent env changes.
for example a commented out docker label, demoted by #
# traefik.http.routers.dashboard.rule: Host(`${TRAEFIK_CNAME}.localhost`, `${TRAEFIK_CNAME}.local.${DOMAIN}`)
It will output warn on pull or up about the env variable. The env var isn't used or referenced by anything that isn't commented out.
have valid yml that uses a env variable
comment out the line in the yml, (line starting with #)
run docker compose pull to
Steps to reproduce the issue:
- Create docker compose and use env file with env var
- Comment out a line that uses a unique env var
- Run pull or up
Describe the results you received:
see variable is not set. Defaulting to a blank string warning.
Describe the results you expected:
Not to see a warning. Compose must be parsing commented out yaml lines in it's env parsing code as that is the likely explanation.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker-compose --version:
Output of docker version:
Docker version 20.10.8, build 3967b7d
Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.
Output of docker info:
Additional environment details (AWS ECS, Azure ACI, local, etc.):