Commit 30d24eec authored by Greg Weber's avatar Greg Weber

add Dockerfile. addresses #136

parent 7d4a92ef
# run this with a terminal
# sudo docker run -rm -p 8778:8778 -i -t <image>
# browser, but the port is not visible
# sudo docker run -rm -i <image> IHaskell notebook
from zsol/haskell-platform-2013.2.0.0:latest
maintainer IHaskell
RUN sudo apt-get update
RUN sudo apt-get install -y pkg-config libtool git automake libncurses-dev python-dev
RUN git clone https://github.com/zeromq/zeromq4-x.git libzmq
RUN cd libzmq && ./autogen.sh && ./configure && make && sudo make install && sudo ldconfig && cd ..
RUN cabal update
RUN cabal install happy cpphs
# use local modifications
ADD . /home/haskell/IHaskell
# use master
# RUN git clone https://github.com/gibiansky/IHaskell
RUN cd IHaskell && ./build.sh all
ENV PATH /home/haskell/.cabal/bin:$PATH
# The first time this runs it will install stuff
RUN IHaskell console
# for IHaskell browser
ENV IHASKELL_NOTEBOOK_EXPOSE 1
EXPOSE 8778
CMD IHaskell console
...@@ -20,7 +20,24 @@ As well as the IPython browser-based notebook interface: ...@@ -20,7 +20,24 @@ As well as the IPython browser-based notebook interface:
*More usage information on the [wiki](https://github.com/gibiansky/IHaskell/wiki).* *More usage information on the [wiki](https://github.com/gibiansky/IHaskell/wiki).*
Installation
Linux Package Installation
===
There is a docker package for Linux. We will put it up on the registry, but for now you can build it yourself by cloning the repo and running:
sudo docker build .
sudo docker run -rm -p 8778:8778 -i -t <image>
Windows Installation
===
Install Virtualbox. Load a Linux distro and install Docker, then run the docker package.
This also works on Mac, but Mac users may prefer installing from source.
Source Installation (Mac and Linux)
=== ===
If you have any trouble with installation or have other questions about IHaskell, feel free to open an issue [on Github](https://github.com/gibiansky/IHaskell/issues?direction=desc&sort=updated&state=open) or join our IRC at #ihaskell on chat.freenode.net. If you have any trouble with installation or have other questions about IHaskell, feel free to open an issue [on Github](https://github.com/gibiansky/IHaskell/issues?direction=desc&sort=updated&state=open) or join our IRC at #ihaskell on chat.freenode.net.
...@@ -90,6 +107,14 @@ Install the `happy` parser generator tool and `cpphs` preprocessor: ...@@ -90,6 +107,14 @@ Install the `happy` parser generator tool and `cpphs` preprocessor:
cabal install happy cpphs cabal install happy cpphs
``` ```
Python Installation
---
IHaskell will automatically install python tools itself.
If you already have ipython installed you can use the --ipython flag.
On Linux make sure you also have `python-dev` (or equivalent) installed, which is needed to install `pyzmq`
IHaskell Installation IHaskell Installation
--- ---
...@@ -99,8 +124,6 @@ cabal update # Please do this! IHaskell updates *very* frequently. ...@@ -99,8 +124,6 @@ cabal update # Please do this! IHaskell updates *very* frequently.
cabal install ihaskell cabal install ihaskell
``` ```
If you are on Linux, make sure you also have `python-dev` (or equivalent) installed, as `pyzmq` (which IHaskell will install itself) may need it.
Running IHaskell Running IHaskell
--- ---
......
...@@ -50,4 +50,4 @@ done ...@@ -50,4 +50,4 @@ done
# Stick a "./" before everything. # Stick a "./" before everything.
INSTALL_DIRS=`echo $INSTALLS | tr ' ' '\n' | sed 's#^#./#' | tr ' ' '\n'` INSTALL_DIRS=`echo $INSTALLS | tr ' ' '\n' | sed 's#^#./#' | tr ' ' '\n'`
cabal install $INSTALL_DIRS --force-reinstalls cabal install -j $INSTALL_DIRS --force-reinstalls
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment