{"action":"created","issue":{"url":"https://api.github.com/repos/webdevops/Dockerfile/issues/54","repository_url":"https://api.github.com/repos/webdevops/Dockerfile","labels_url":"https://api.github.com/repos/webdevops/Dockerfile/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/webdevops/Dockerfile/issues/54/comments","events_url":"https://api.github.com/repos/webdevops/Dockerfile/issues/54/events","html_url":"https://github.com/webdevops/Dockerfile/issues/54","id":143121084,"number":54,"title":"Referring to environment variable within PHP","user":{"login":"r24y","id":8356669,"avatar_url":"https://avatars.githubusercontent.com/u/8356669?v=3","gravatar_id":"","url":"https://api.github.com/users/r24y","html_url":"https://github.com/r24y","followers_url":"https://api.github.com/users/r24y/followers","following_url":"https://api.github.com/users/r24y/following{/other_user}","gists_url":"https://api.github.com/users/r24y/gists{/gist_id}","starred_url":"https://api.github.com/users/r24y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r24y/subscriptions","organizations_url":"https://api.github.com/users/r24y/orgs","repos_url":"https://api.github.com/users/r24y/repos","events_url":"https://api.github.com/users/r24y/events{/privacy}","received_events_url":"https://api.github.com/users/r24y/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-24T01:31:36Z","updated_at":"2016-03-24T11:34:19Z","closed_at":null,"body":"I'm using `webdevops/php-apache:debian-8`, and I wish to pass configuration parameters to the app via environment variables (accessible via getenv()). However, when I display `phpinfo()`, the only two environment variables are `USER` and `HOME`. Somewhere in `init process > supervisord > apache > php` the environment variables aren't getting handed down. I've been researching for hours and would really love a nudge in the right direction.\r\n\r\nOf course I don't expect anything for free, would love to give back in terms of code or documentation, just stuck in a tight spot right now :)"},"comment":{"url":"https://api.github.com/repos/webdevops/Dockerfile/issues/comments/200798486","html_url":"https://github.com/webdevops/Dockerfile/issues/54#issuecomment-200798486","issue_url":"https://api.github.com/repos/webdevops/Dockerfile/issues/54","id":200798486,"user":{"login":"r24y","id":8356669,"avatar_url":"https://avatars.githubusercontent.com/u/8356669?v=3","gravatar_id":"","url":"https://api.github.com/users/r24y","html_url":"https://github.com/r24y","followers_url":"https://api.github.com/users/r24y/followers","following_url":"https://api.github.com/users/r24y/following{/other_user}","gists_url":"https://api.github.com/users/r24y/gists{/gist_id}","starred_url":"https://api.github.com/users/r24y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r24y/subscriptions","organizations_url":"https://api.github.com/users/r24y/orgs","repos_url":"https://api.github.com/users/r24y/repos","events_url":"https://api.github.com/users/r24y/events{/privacy}","received_events_url":"https://api.github.com/users/r24y/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T11:34:19Z","updated_at":"2016-03-24T11:34:19Z","body":"Thanks a million! :tada: this really helps me a ton. @mblaschke I'll leave it up to you whether to close this issue since I know sometimes project maintainers like to leave these things open. My problem is solved though.\r\n\r\nIn case anyone else comes across this thread looking for a quick resolution: I started my container as usual, then ran: \r\n```\r\nmkdir fpm-conf\r\ndocker exec my_container cat /etc/php5/fpm/pool.d/application.conf > fpm-conf/application.conf\r\n```\r\n\r\nThen in my Dockerfile, added the line\r\n```\r\nCOPY ./fpm-conf/application.conf /etc/php5/fpm/pool.d/application.conf\r\n```\r\n\r\nWorks like a charm and I can now pass environment variables to my PHP!"}}