HUB
Sign inSign up

nnwww/haskell-stack-link

By nnwww

•Updated almost 9 years ago

The correct way to build a static binary in haskell (for GHC8).

Image
0

1.1K

nnwww/haskell-stack-link repository overview

Simple base image based on: https://vadosware.io/post/static-binaries-for-haskell-a-convoluted-approach/⁠ https://www.reddit.com/r/haskell/comments/5lk33p/struggling_building_a_static_binary_for_aws/⁠

  1. Adding ld-options: -static to your cabal file.
  2. Mounting the project directory.
  3. Running stack clean; stack install --split-objs --ghc-options="-fPIC" (Using stack, defalut binary path is $HOME/.local/bin).
  4. You can compress a static binary using upx (installed).
Tag summary
Recent tags
Content type
Image
Digest
Size
276.9 MB
Last updated
almost 9 years ago
docker pull nnwww/haskell-stack-link:latest