Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHC gets nuked from docker images #7636

Open
dpwiz opened this issue Jan 1, 2025 · 9 comments
Open

GHC gets nuked from docker images #7636

dpwiz opened this issue Jan 1, 2025 · 9 comments

Comments

@dpwiz
Copy link
Contributor

dpwiz commented Jan 1, 2025

Using an image from e.g. fpco/stack-build:lts-22.43 results in a 11.2GB download that can't actually build Haskell projects due to missing GHC.

I don't know when did that start, but I found that the current lts-23.0 Dockerfile has this line:

    find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \

However if you enter that container and run stack setup, the programs would contain ./programs/x86_64-linux/ghc-tinfo6-9.6.6/* instead. That does not quite match the glob and the installed compiler gets rmd.

The path needs to be updated to either ghc-tinfo6-$GHC_VERSION or ghc*-$GHC_VERSION.

@dpwiz
Copy link
Contributor Author

dpwiz commented Jan 1, 2025

  • 19.x appears to be working.
  • 20.x should work as it has the same FROM ubuntu:18.04.
  • 21.x however got upgraded to 22.04 which may brought that tinfo6 bit.

@mihaimaruseac
Copy link
Contributor

Thanks for raising the issue. I haven't been using the docker images for years but the description seems relevant. The curators team will take a look at this

@senysenyseny16
Copy link

senysenyseny16 commented Jan 1, 2025

It seems like images after version 19 are completely broken:

https://www.stackage.org/lts-20.26

LTS Haskell 20.26 (ghc-9.2.8) 
docker run -it --rm fpco/stack-build:lts-20.26 /bin/bash
root@41624d160e06:/# which ghc
/home/stackage/.stack/programs/x86_64-linux/ghc-9.2.5/bin/ghc

9.2.8 <> 9.2.5

@mihaimaruseac
Copy link
Contributor

#7397 is also relevant here

@chreekat
Copy link
Member

chreekat commented Jan 7, 2025

Yeah, the decision was to simply deprecate those stack-build images (which I guess is already done on accident since they're broken).

@dpwiz and @senysenyseny16 , can you describe how you use these images (if you do) so that we can figure out how to keep supporting your workflows?

@juhp
Copy link
Contributor

juhp commented Jan 10, 2025

Yes the Docker Hub builds are actually intended long deprecated - I guess we "forgot" to turn them off yet.

The current (ghcr) builds are built in github - not very sure how useful they are, but they have been available for a good while now:- we probably never announced them formally...

See https://github.com/commercialhaskell/stackage/pkgs/container/stackage%2Fbuild

@juhp
Copy link
Contributor

juhp commented Jan 10, 2025

Well a simple solution would be to fix the "find rm" line as mentioned - hopefully it could be done better: not convinced that nuking all the rest of ~/.stack/ is optimal anyway?

@juhp
Copy link
Contributor

juhp commented Jan 10, 2025

I pushed the tweak you suggested @dpwiz

(I note this path is also listed in PATH, but that probably matters less: we should probably just remove it from there - there are other stale parts too I believe like cuda/java there too)

@juhp
Copy link
Contributor

juhp commented Jan 10, 2025

Actually looking at the stack-build docker hub images I am further confused: some seem to be big (> 3GB) and others small (< 1GB) - what is the actual expectation? (I write "confused" since most recent images are also large: https://hub.docker.com/r/fpco/stack-build/tags?page=1)

I think the GHCR image may be big too: https://github.com/commercialhaskell/stackage/pkgs/container/stackage%2Fbuild/319121885?tag=lts23 which is desired iirc (ie it contains ghc)?

Could you try using the GitHub image instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants