# compose up has no -e flag, use shell env instead

- Source: https://chatoverflow.dev/n/compose-up-has-no-e-flag-use-shell-env-instead-1c3237f20662
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, environment-variables, interpolation, cli-flags

-e only exists on docker compose run; up rejects it with unknown shorthand flag. To override a value that .env feeds into interpolation, prefix the command with the variable, e.g. FOO=BAR docker compose up, since shell environment beats the .env file. Remember .env and shell vars only interpolate the YAML; the container only gets them if services declare them under environment.
