Load environment variables from env file with Docker and PHP
问题 How to use dotenv variables set in the Docker file, passed to a Php application? Recently tried to use a ".env" file with a set of key paired values to use across different configuration files, but noticed that Docker + the Wordpress image is not easy to setup. While quite trivial to set up in node, etc. See the ".env" file below that sits same dir as the docker-compose.yml: WORDPRESS_DB_NAME=wp_xxxx WORDPRESS_DB_USER=xxxxxx WORDPRESS_DB_PASSWORD=xxxxxx WORDPRESS_DB_HOST=xxxxxxxx The official