Skip to content

Spaces in environment variable values prevents docker from starting #8861

@FrankChen021

Description

@FrankChen021

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"
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions