State of deploying Haskell binaries in containers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

State of deploying Haskell binaries in containers

Arnaud Bailly-2

Hello,
For a while now I have been building and deploying docker images containing Haskell binaries. My current workflow is reasonably fast and efficient, producing images of about 40MB for a server with under 100 modules, but it's very ad hoc:
- build a Haskell-base image containing GHC + stack + whatever is needed for building
- build project within Haskell-base container instance using a different stack-work directory
- package binary into an alpine:3.8 image containing runtime dependencies

What's the state-of-the-art of Haskell/GHC + docker integration in 2020? What should I use instead of building custom images? I have seen recent announcements about full static linking of GHC build binaries but I must admit the prospect of adding Nix + Bazel to the already large stack of tools I need is not enthusing. I am probably wrong.

Thanks for sharing insights
-- 
Arnaud Bailly - @dr_c0d3

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: State of deploying Haskell binaries in containers

Isaac Elliott
I use Nix to build Docker images (no bazel). I love it. I'm never using 'docker build' again.

On Tue, 6 Oct 2020, 9:08 pm Arnaud Bailly, <[hidden email]> wrote:

Hello,
For a while now I have been building and deploying docker images containing Haskell binaries. My current workflow is reasonably fast and efficient, producing images of about 40MB for a server with under 100 modules, but it's very ad hoc:
- build a Haskell-base image containing GHC + stack + whatever is needed for building
- build project within Haskell-base container instance using a different stack-work directory
- package binary into an alpine:3.8 image containing runtime dependencies

What's the state-of-the-art of Haskell/GHC + docker integration in 2020? What should I use instead of building custom images? I have seen recent announcements about full static linking of GHC build binaries but I must admit the prospect of adding Nix + Bazel to the already large stack of tools I need is not enthusing. I am probably wrong.

Thanks for sharing insights
-- 
Arnaud Bailly - @dr_c0d3
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.