I tried to create the Happstack PoC executable in Google App Engine using this Docker file:
FROM ubuntu:14.04 ENV APP_ROOT=/usr/share/app RUN apt-get update && apt-get install curl -y && curl -sSL https://get.haskellstack.org/ | sh COPY . ${APP_ROOT}/ WORKDIR ${APP_ROOT}/ RUN stack setup RUN stack build EXPOSE 8000 ENTRYPOINT ["stack","exec","app-exe"]
It works, and I was able to deploy, but the resulting image seems huge.
I think the image is about 450 MB after installing stack , about 1.8 GB after stack setup and about 3 GB after stack build .
I think hundreds of MB seem reasonable, even up to GB. Is there any other approach I should take, perhaps extracting the resulting executable file to another image in some way to eliminate all unnecessary at runtime?
source share