diff --git a/content/manuals/compose/how-tos/environment-variables/variable-interpolation.md b/content/manuals/compose/how-tos/environment-variables/variable-interpolation.md index 820836559b4..516e2f27c03 100644 --- a/content/manuals/compose/how-tos/environment-variables/variable-interpolation.md +++ b/content/manuals/compose/how-tos/environment-variables/variable-interpolation.md @@ -130,9 +130,13 @@ The following syntax rules apply to environment files: - Blank lines are ignored. - Unquoted and double-quoted (`"`) values have interpolation applied. - Each line represents a key-value pair. Values can optionally be quoted. +- Delimiter separating key and value can be either `=` or `:`. +- Spaces before and after value are ignored. - `VAR=VAL` -> `VAL` - `VAR="VAL"` -> `VAL` - `VAR='VAL'` -> `VAL` + - `VAR: VAL` -> `VAL` + - `VAR = VAL ` -> `VAL` - Inline comments for unquoted values must be preceded with a space. - `VAR=VAL # comment` -> `VAL` - `VAR=VAL# not a comment` -> `VAL# not a comment` diff --git a/content/reference/compose-file/services.md b/content/reference/compose-file/services.md index c3acb191bd8..2e2d319af88 100644 --- a/content/reference/compose-file/services.md +++ b/content/reference/compose-file/services.md @@ -688,9 +688,13 @@ Each line in an `.env` file must be in `VAR[=[VAL]]` format. The following synta - Blank lines are ignored. - Unquoted and double-quoted (`"`) values have [Interpolation](interpolation.md) applied. - Each line represents a key-value pair. Values can optionally be quoted. +- Delimiter separating key and value can be either `=` or `:`. +- Spaces before and after value are ignored. - `VAR=VAL` -> `VAL` - `VAR="VAL"` -> `VAL` - `VAR='VAL'` -> `VAL` + - `VAR: VAL` -> `VAL` + - `VAR = VAL ` -> `VAL` - Inline comments for unquoted values must be preceded with a space. - `VAR=VAL # comment` -> `VAL` - `VAR=VAL# not a comment` -> `VAL# not a comment`