We have a docker compose file which uses an external environment configuration file. This compose file works well for years until I upgraded my Docker Desktop(Intel Chip) to the latest 4.1.1 recently.
Why the compose file fails to start is because there are some environment variables whose values contains spaces.
For example
JAVA_OPTS=-Duser.timezone=UTC -Dfile.encoding=UTF-8
When I switch back to version 4.0.0, the compose file works. And all previously Docker desktop works too because we have used those early versions such as 3.x for a long time.
To make the compose file work, I have to change the variable definition to
JAVA_OPTS="-Duser.timezone=UTC -Dfile.encoding=UTF-8"