{"action":"created","issue":{"url":"https://api.github.com/repos/mitchty/alpine-ghc/issues/1","labels_url":"https://api.github.com/repos/mitchty/alpine-ghc/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mitchty/alpine-ghc/issues/1/comments","events_url":"https://api.github.com/repos/mitchty/alpine-ghc/issues/1/events","html_url":"https://github.com/mitchty/alpine-ghc/issues/1","id":123922793,"number":1,"title":"Slimming the image size","user":{"login":"frol","id":304265,"avatar_url":"https://avatars.githubusercontent.com/u/304265?v=3","gravatar_id":"","url":"https://api.github.com/users/frol","html_url":"https://github.com/frol","followers_url":"https://api.github.com/users/frol/followers","following_url":"https://api.github.com/users/frol/following{/other_user}","gists_url":"https://api.github.com/users/frol/gists{/gist_id}","starred_url":"https://api.github.com/users/frol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frol/subscriptions","organizations_url":"https://api.github.com/users/frol/orgs","repos_url":"https://api.github.com/users/frol/repos","events_url":"https://api.github.com/users/frol/events{/privacy}","received_events_url":"https://api.github.com/users/frol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-26T10:25:14Z","updated_at":"2015-12-26T12:01:39Z","closed_at":null,"body":"Naive question: I'm not very familiar with Haskell; is it really so huge by itself?\r\n\r\nEven if the Haskell is huge, you can still slim the image size a little bit:\r\n\r\n1. Remove `apk update` and pass `--no-cache` option ([added in Alpine 3.3](http://bugs.alpinelinux.org/issues/4905)) to `apk add`.\r\n2. Remove `apk upgrade` since there is no need for it (the image is just a couple of days old).\r\n3. Could you please consider moving the packages that are unrelated to GHC (like `bash`, `linux-headers`, `musl-dev`, `gmp-dev`, `zlib-dev`, `make`) to a next layer image if you need them? Are those required by GHC to build even a hello-world code?"},"comment":{"url":"https://api.github.com/repos/mitchty/alpine-ghc/issues/comments/167319237","html_url":"https://github.com/mitchty/alpine-ghc/issues/1#issuecomment-167319237","issue_url":"https://api.github.com/repos/mitchty/alpine-ghc/issues/1","id":167319237,"user":{"login":"mitchty","id":611923,"avatar_url":"https://avatars.githubusercontent.com/u/611923?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchty","html_url":"https://github.com/mitchty","followers_url":"https://api.github.com/users/mitchty/followers","following_url":"https://api.github.com/users/mitchty/following{/other_user}","gists_url":"https://api.github.com/users/mitchty/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchty/subscriptions","organizations_url":"https://api.github.com/users/mitchty/orgs","repos_url":"https://api.github.com/users/mitchty/repos","events_url":"https://api.github.com/users/mitchty/events{/privacy}","received_events_url":"https://api.github.com/users/mitchty/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T12:01:39Z","updated_at":"2015-12-26T12:01:39Z","body":"Ok done, I could also nuke the WORKDIR directive. If I recall correctly that adds another layer that probably isn't needed."}}