1- # BUILD-USING: docker build -t codewars/runner-func .
2- # TEST-USING: docker run --rm -i -t --name=test-runner-func --entrypoint=/bin/bash codewars/runner-haskell -s
3- # RUN-USING: docker run --rm --name=runner-func codewars/runner-func --help
1+ # BUILD-USING: docker build -t codewars/runner-haskell .
2+ # TEST-USING: docker run --rm -i -t --name=test-runner-haskell --entrypoint=/bin/bash codewars/runner-haskell -s
3+ # RUN-USING: docker run --rm --name=runner-haskell codewars/runner-haskell --help
44
55# Pull base image.
66FROM codewars/base-runner
@@ -13,32 +13,32 @@ RUN add-apt-repository ppa:hvr/ghc
1313RUN apt-get update
1414
1515# Install Haskell System
16- # lts-1.0 is minimum version that contain ifelse
17- ENV LTS_VER=1.0 GHC_VER=7.8.4 CABAL_VER=1.18 HAPPY_VER=1.19.4
16+ ENV RESOLVER=lts-6.24 GHC_VER=7.10.3 CABAL_VER=1.22 HAPPY_VER=1.19.5
1817
1918RUN apt-get install -y ghc-${GHC_VER} cabal-install-${CABAL_VER} happy-${HAPPY_VER}
2019
2120USER codewarrior
2221ENV HOME /home/codewarrior
2322ENV PATH=${HOME}/.cabal/bin:/opt/ghc/${GHC_VER}/bin:/opt/cabal/${CABAL_VER}/bin:/opt/happy/${HAPPY_VER}/bin:${PATH}
2423RUN mkdir ${HOME}/.cabal ${HOME}/.cabal/bin
25- RUN echo "remote-repo: stackage_lts-${LTS_VER }:http://www.stackage.org/lts-${LTS_VER }" >> ${HOME}/.cabal/config
24+ RUN echo "remote-repo: stackage_${RESOLVER }:http://www.stackage.org/${RESOLVER }" >> ${HOME}/.cabal/config
2625RUN echo "remote-repo-cache: /home/codewarrior/.cabal/packages" >> ${HOME}/.cabal/config
2726RUN cabal update
2827RUN cabal install cabal-install
2928
3029# Install Haskell Packages
3130# To install additional packages use "RUN cabal install <pkg-name>"
3231RUN cabal install split ifelse
33- RUN cabal install esqueleto persistent-sqlite persistent-template
32+ RUN cabal install persistent-sqlite persistent-template
3433RUN cabal install haskell-src-exts lens
3534RUN cabal install hspec hspec-core hspec-discover
3635
3736# -------------------------------------------------------------------------
3837# Haskell stuff end.
3938# =========================================================================
4039
41- # # add the package json first to a tmp directory and build, copy over so that we dont rebuild every time
40+ # Add the package json first to a tmp directory and build,
41+ # copy over so that we dont rebuild every time
4242USER root
4343ADD package.json /tmp/package.json
4444RUN cd /tmp && npm install --production
@@ -51,6 +51,6 @@ WORKDIR /runner
5151USER codewarrior
5252RUN mocha -t 10000 test/runners/haskell_spec.js
5353
54- # # timeout is a fallback in case an error with node
55- # # prevents it from exiting properly
54+ # timeout is a fallback in case an error with node
55+ # prevents it from exiting properly
5656ENTRYPOINT ["timeout", "15", "node"]
0 commit comments