Haskell Web Server in a 5MB Docker Image
fpcomplete.com
Haskell Web Server in a 5MB Docker Image
1–9 of 9 posts
Re: Haskell Web Server in a 5MB Docker Image
#2There was a go web server I dockerized and came under 5MB [1]. But the thttpd image by larsks was an amazing 1MB [2].
Re: Haskell Web Server in a 5MB Docker Image
#3With going unikernel with Haskell still being a little steep (but definitely on my wish list), then the next-best would be a mini VM/container image. And 5MB sure is mini!
Once again, thanks FPComplete!
Re: Haskell Web Server in a 5MB Docker Image
#4I was looking into some of this myself already; really helpful article and amazing results. Another interesting approach is to compile Haskell with HaLVM[1] in to a unikernel that can run on a Xen hypervisor. But this is a non-posix environment on which Haskell's "network" package does not compile. No "network" means that it is currently impossible[2] for WAI (Haskell's standard interface between web servers and appl…
Re: Haskell Web Server in a 5MB Docker Image
#5I was looking into some of this myself already; really helpful article and amazing results. Another interesting approach is to compile Haskell with HaLVM[1] in to a unikernel that can run on a Xen hypervisor. But this is a non-posix environment on which Haskell's "network" package does not compile. No "network" means that it is currently impossible[2] for WAI (Haskell's standard interface between web servers and appl…
OCaml's Mirage unikernel seems to have a lot of steam these days.
My main reason for going with Haskell is that I know the costs of bugs, and feel that I get to old for fighting bugs on tight deadlines.
1: http://slides.com/technolo-g/intro-to-unikernels-and-erlang-...
Re: Haskell Web Server in a 5MB Docker Image
#6Earlier quoted context omitted.
OCaml's Mirage unikernel seems to have a lot of steam these days.
Yeah it's a very complete project. And we saw "Look Ma No OS"[1] today on HN about Erlang/Elixir-on-Xen with the LING unikernel. But it is Haskell that I'm personally all hyped up about lately; and OS-less-ness is to me merely a potential secondary advantage of going back to "compiled" (I come from Ruby/Python before that Java before that C++). My main reason for going with Haskell is that I know the costs of bugs, a…
If I had any genuine reason for a unikernel today I'd definitely go for Mirage.
Re: Haskell Web Server in a 5MB Docker Image
#7The resulting image for "hello world" compressed with `xz` (default options) is 1.5MB. And it runs in a chroot or with qemu too.
Re: Haskell Web Server in a 5MB Docker Image
#8I later adapted that for use in propellor too, when it's deploying docker/etc containers. This allows propellor to bootstrap itself to run inside an arbitrary docker container. http://joeyh.name/blog/entry/propelling_containers/
Later, I used propellor's ability to bootstrap itself this way to let it copy itself onto a VM and run there to replace its content with a clean reinstall of Debian. http://joeyh.name/blog/entry/clean_OS_reinstalls_with_propel...
Re: Haskell Web Server in a 5MB Docker Image
#9I later adapted that for use in propellor too, when it's deploying docker/etc containers. This allows propellor to bootstrap itself to run inside an arbitrary docker container. http://joeyh.name/blog/entry/propelling_containers/
Later, I used propellor's ability to bootstrap itself this way to let it copy itself onto a VM and run there to replace its content with a clean reinstall of Debian. http://joeyh.name/blog/entry/clean_OS_reinstalls_with_propel...