docker run --env-file .env myimage

Category: Docker

docker run --env-file .env myimage

Load environment variables into a container from a .env file

Reads all KEY=VALUE lines from a .env file and injects them as environment variables inside the container.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.