diff --git a/compose/compose-file/compose-file-v2.md b/compose/compose-file/compose-file-v2.md index 4fa45cbf57..7ea7e0179d 100644 --- a/compose/compose-file/compose-file-v2.md +++ b/compose/compose-file/compose-file-v2.md @@ -352,8 +352,9 @@ Add environment variables from a file. Can be a single value or a list. If you have specified a Compose file with `docker-compose -f FILE`, paths in `env_file` are relative to the directory that file is in. -Environment variables specified in [environment](#environment) _override_ -these values. +Environment variables declared in the [environment](#environment) section +_override_ these values – this holds true even if those values are +empty or undefined. env_file: .env diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index e2a5750cef..4648bb48c4 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -873,8 +873,9 @@ Add environment variables from a file. Can be a single value or a list. If you have specified a Compose file with `docker-compose -f FILE`, paths in `env_file` are relative to the directory that file is in. -Environment variables specified in [environment](#environment) _override_ -these values. +Environment variables declared in the [environment](#environment) section +_override_ these values – this holds true even if those values are +empty or undefined. env_file: .env