diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9907a03 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM haskell:7.8 + +RUN cabal update && cabal install cabal-install + +ENV PATH .cabal-sandbox/bin:$HOME/.cabal/bin:$PATH diff --git a/README.md b/README.md index 00565f6..c5a95c2 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,35 @@ The project uses Stackage to maintain build stability ## Instructions +### Docker + +Requirements: + +* [docker](https://docs.docker.com/installation) +* [fig](http://www.fig.sh/install.html) + +Build the Docker container: +``` +fig up -d +``` + +Then fire up bash: +``` +fig run dev bash +``` + +You can now run the next instructions to install, build and run tests inside the container. We mount the current directory as `/workspace` so that you only have to install once. + +Additionally, if you want to use GHCi: +``` +fig run dev +``` + +Or `cabal repl`: +``` +fig run dev cabal repl +``` + ### To install: ``` cabal sandbox init diff --git a/fig.yml b/fig.yml new file mode 100644 index 0000000..4873202 --- /dev/null +++ b/fig.yml @@ -0,0 +1,5 @@ +dev: + build: . + volumes: + - .:/workspace + working_dir: /workspace