{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/php/issues/347","repository_url":"https://api.github.com/repos/docker-library/php","labels_url":"https://api.github.com/repos/docker-library/php/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/php/issues/347/comments","events_url":"https://api.github.com/repos/docker-library/php/issues/347/events","html_url":"https://github.com/docker-library/php/issues/347","id":194627833,"number":347,"title":"Use ARG instead of ENV for some variables","user":{"login":"EvgenyOrekhov","id":8045060,"avatar_url":"https://avatars.githubusercontent.com/u/8045060?v=3","gravatar_id":"","url":"https://api.github.com/users/EvgenyOrekhov","html_url":"https://github.com/EvgenyOrekhov","followers_url":"https://api.github.com/users/EvgenyOrekhov/followers","following_url":"https://api.github.com/users/EvgenyOrekhov/following{/other_user}","gists_url":"https://api.github.com/users/EvgenyOrekhov/gists{/gist_id}","starred_url":"https://api.github.com/users/EvgenyOrekhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvgenyOrekhov/subscriptions","organizations_url":"https://api.github.com/users/EvgenyOrekhov/orgs","repos_url":"https://api.github.com/users/EvgenyOrekhov/repos","events_url":"https://api.github.com/users/EvgenyOrekhov/events{/privacy}","received_events_url":"https://api.github.com/users/EvgenyOrekhov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-12-09T15:47:08Z","updated_at":"2016-12-12T18:30:06Z","closed_at":null,"body":"```dockerfile\r\nENV CFLAGS=\"-fstack-protector-strong -fpic -fpie -O2\"\r\nENV CPPFLAGS=\"$CFLAGS\"\r\nENV LDFLAGS=\"-Wl,-O1 -Wl,--hash-style=both\"\r\n```\r\n\r\nhttps://github.com/docker-library/php/blob/173945670390f6595da8f93ae46b442167ff05be/7.1/fpm/alpine/Dockerfile#L47-L49\r\n\r\nThese `ENV` variables are persisted into the built image, which makes using `php:fpm-alpine` as the base image problematic (for example when one wants to build something from source these variables will interfere with the build process and break it).\r\n\r\nHere is an example of a relevant issue of a failing compilation process when using `php:fpm-alpine` as the base image: https://github.com/openresty/docker-openresty/issues/25.\r\n\r\nThe `ARG` instruction should be used to avoid that problem."},"comment":{"url":"https://api.github.com/repos/docker-library/php/issues/comments/266511198","html_url":"https://github.com/docker-library/php/issues/347#issuecomment-266511198","issue_url":"https://api.github.com/repos/docker-library/php/issues/347","id":266511198,"user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T18:30:06Z","updated_at":"2016-12-12T18:30:06Z","body":"Same error after adding `-fPIC`; now testing without any PIC flags or `-fpie`."}}
{"actor":{"display_login":"tianon"}}