{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/aspnet-docker/issues/94","labels_url":"https://api.github.com/repos/aspnet/aspnet-docker/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/aspnet-docker/issues/94/comments","events_url":"https://api.github.com/repos/aspnet/aspnet-docker/issues/94/events","html_url":"https://github.com/aspnet/aspnet-docker/pull/94","id":108789507,"number":94,"title":"Combine some layers and purge packages to reduce image size.","user":{"login":"glennc","id":234688,"avatar_url":"https://avatars.githubusercontent.com/u/234688?v=3","gravatar_id":"","url":"https://api.github.com/users/glennc","html_url":"https://github.com/glennc","followers_url":"https://api.github.com/users/glennc/followers","following_url":"https://api.github.com/users/glennc/following{/other_user}","gists_url":"https://api.github.com/users/glennc/gists{/gist_id}","starred_url":"https://api.github.com/users/glennc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennc/subscriptions","organizations_url":"https://api.github.com/users/glennc/orgs","repos_url":"https://api.github.com/users/glennc/repos","events_url":"https://api.github.com/users/glennc/events{/privacy}","received_events_url":"https://api.github.com/users/glennc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/aspnet-docker/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-29T03:49:40Z","updated_at":"2015-09-29T04:04:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/aspnet-docker/pulls/94","html_url":"https://github.com/aspnet/aspnet-docker/pull/94","diff_url":"https://github.com/aspnet/aspnet-docker/pull/94.diff","patch_url":"https://github.com/aspnet/aspnet-docker/pull/94.patch"},"body":"We had some people complain about the image size. 736 MB seems rather large, so I looked at the layers to see if there was something obvious we could trim. \r\n\r\nThese changes purge the packages needed to build libuv in a single command and don't keep the metadata from apt-get in-between all the layers. Together it reduces the image size by just over 90MB (735.6MB to 638.5MB according to `docker image`) and doesn't look like it impacts readability of the Dockerfile too much.\r\n\r\nWhat do you guys think? I've never really tried to keep an image small before. So I don't know if these sorts of tricks are what we want or if we should just be doing a cleanup at the end and then flattening the image with an export/import or something. Seems combining layers and keeping unnecessary files out of the image is probably better. \r\n\r\nAside: I spoke to @BrennanConroy who said that someone on the Mono team said that 20 was a more appropriate number for MONO_THREADS_PER_CPU. So I thought I would throw that in here. We can do that as a separate PR if we don't do the rest of this."},"comment":{"url":"https://api.github.com/repos/aspnet/aspnet-docker/issues/comments/143938013","html_url":"https://github.com/aspnet/aspnet-docker/pull/94#issuecomment-143938013","issue_url":"https://api.github.com/repos/aspnet/aspnet-docker/issues/94","id":143938013,"user":{"login":"glennc","id":234688,"avatar_url":"https://avatars.githubusercontent.com/u/234688?v=3","gravatar_id":"","url":"https://api.github.com/users/glennc","html_url":"https://github.com/glennc","followers_url":"https://api.github.com/users/glennc/followers","following_url":"https://api.github.com/users/glennc/following{/other_user}","gists_url":"https://api.github.com/users/glennc/gists{/gist_id}","starred_url":"https://api.github.com/users/glennc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennc/subscriptions","organizations_url":"https://api.github.com/users/glennc/orgs","repos_url":"https://api.github.com/users/glennc/repos","events_url":"https://api.github.com/users/glennc/events{/privacy}","received_events_url":"https://api.github.com/users/glennc/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T04:04:27Z","updated_at":"2015-09-29T04:04:27Z","body":"I totally set it to 50....no idea what you are talking about."}}