You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
COMPOSE_FILE=<name-of-compose-file>.yml docker-compose run --rm build
Epected
Then cabal initialises a project and /opt/ghc/9.2.1/bin is in the PATH environment variable that is printed
Actual
Then cabal fails with The program 'ghc' version >=7.0.1 is required but it could not be found.
And the PATH is printed as PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
The text was updated successfully, but these errors were encountered:
I've done some testing on other official images and about 50% will work with a login shell. They seem to work because they happen to copy executables into /usr/local/bin (like we do with cabal + stack) rather than doing anything with .bash_profile etc.
I've been using docker run haskell:9.2.1 bash -lc "ghc --version" as a minimal repro BTW.
Thanks for the hint. I ended up not needing the login shell for my project (I had copied over and modified the compose file from another project that was running end-to-end tests).
I'll close this issue, as I don't think there is a use case for building Haskell projects in a login shell.
How to reproduce
Given the following compose file
When I run
Epected
Then cabal initialises a project and /opt/ghc/9.2.1/bin is in the PATH environment variable that is printed
Actual
Then cabal fails with
The program 'ghc' version >=7.0.1 is required but it could not be found.
And the PATH is printed as
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
The text was updated successfully, but these errors were encountered: