I have created a docker image with based on fpco/stack-build with GHCJS
installed and known to stack.
I have a project which I am able to build with ghcjs by copying the project
into the docker container and running stack build.
However, if I try to build the project locally (with the appropriate docker
section added to the stack.yaml) it complains that it can't find the ghcjs
It is as if it is looking for the compiler locally instead of in the
Is the intended behaviour or what am I doing wrong?
The Dockerfile I used to build my image was as follows:
MAINTAINER Casper Clemence <maninal...@gmail.com>
# install ghcj
COPY "ghcjs/ghc-8.0-2016-09-14-lts-7.0-9007000.tar.gz" "/root/"
ADD ghcjs-build /root/ghcjs-build
RUN cd /root/ghcjs-build && stack setup
RUN rm -rf /root/ghcjs-build
# install Google Closure compiler
RUN sudo apt-get update
RUN sudo apt-get install closure-compiler -y
The tar file is downloaded from
http://tolysz.org/ghcjs/ghc-8.0-2016-09-14-lts-7.0-9007000.tar.gz (my starting
point has been https://github.com/tolysz/spock-ghcjs-sample).
The directory ghcjs-build contains nothing but a stack.yaml file, the
contents of which are:
The stack.yaml for the project itself looks like:
By copying the project into a docker container created from the image
maninalift/stack-ghcjs-build and deleting the docker section of the
stack.yaml file, I can build the project.
If however I try to build the project locally I get the following error:
No compiler found, expected exact version ghcjs-0.2.0.9007000_ghc-8.0.1 (
x86_64) (based on resolver setting in /home/caz/repos/pets/xweb/site/project
Try running "stack setup" to install the correct GHC into /home/caz/.stack/
Am I just misunderstanding the design of stack when I expect it to detect
ghcjs inside the docker container? I'd really like users of the repository
to be able to download the docker image and start building the project
without building ghcjs.
Thank you all for your attention.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.