Docker · tool · fg-0259
docker run --env-file keeps the quote characters that Compose and shells strip from values
The variable arrives in the container as "hello world" with the quotes included
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
docker run --env-file reads each line as a raw NAME=value with no quote handling, while Compose parses env files with shell-like quoting. CLI maintainers treat the raw format as intended, so the two stay different.
Fix
Keep a separate unquoted file for docker run --env-file, pass the values with -e, or start the container through Compose.
Apply
# app.env used with: docker run --env-file app.env image GREETING=hello world # not GREETING="hello world"
Affects: Docker CLI, all versions through October 2026 (issue open since 2022)
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp