Show the environment variables of a Docker container
docker show environment variables | check env vars in running container | docker exec env | docker | exec | configurationdocker exec app envRuns env in the running container and shows the variables as the application actually sees them, including those from environment: or .env of a Compose file. Useful when an application starts with default values despite a variable being set.
Note: The output often contains passwords and API keys, so do not paste it into tickets or chats without checking. Only works with running containers whose image includes env.
Also searched as
- docker show environment variables
- check env vars in running container
- docker exec env