haskell / docker-haskell

MIT License
63 stars 36 forks source link

Use ghcup to install toolchain #47

Closed hasufell closed 2 years ago

hasufell commented 2 years ago

Alternative to https://github.com/haskell/docker-haskell/pull/44 and https://github.com/haskell/docker-haskell/pull/46

Reasoning

  1. ghcup is more robust and portable: installation across different distros is seamless and we don't need to find the correct tarballs
  2. ghcup does gpg and sha256sum verification automatically, just like apt would
  3. ghcup's metadata is more up to date and in sync with GHC/cabal/stack releases than most distro repos
  4. keeping ghcup in the image is reasonable, since the binary size is small and it allows easier experimentation for users when shelling into the container, without complicated deriving of images
  5. some manual steps are taken to reduce image size, which is now at 1.74GB on my machine
  6. binaries are installed into /usr/bin so we don't need to mess with PATHs