Unverified Commit 9101efc8 authored by Vaibhav Sagar's avatar Vaibhav Sagar Committed by GitHub

Merge pull request #844 from jcberentsen/stackdocker

Support using 'stack --docker'
parents 02fae1df bc6d9cad
...@@ -81,6 +81,29 @@ Currently the component that takes the longest time to compile is ...@@ -81,6 +81,29 @@ Currently the component that takes the longest time to compile is
`ihaskell-widgets`, so if you're in a hurry you may want to comment that out in `ihaskell-widgets`, so if you're in a hurry you may want to comment that out in
`stack.yaml`. `stack.yaml`.
## Stack development with Docker
This is an alternative way to use Docker than above, taking advantage of stack's Docker support.
Makes it easy to install new packages with `stack --docker install <pkg>` without having to rebuild a docker image.
Like the other Docker workflow, this doesn't require any host dependecies to be installed.
```bash
docker build -t ihaskell-dev docker
stack --docker setup
stack --docker install
stack --docker exec ihaskell -- install --stack
stack --docker exec jupyter -- notebook --ip=0.0.0.0 notebooks
```
Everything in the LTS can be made available!
To add a package outside the LTS, simply add it to the `stack.yaml` file (See: "Where are my packages?" below).
Then install the package with stack before restarting `jupyter`
```bash
# after adding details about mypackage to stack.yaml
stack --docker install mypackage
stack --docker exec jupyter -- notebook notebooks
```
## Nix ## Nix
If you have the `nix` package manager installed, you can create an IHaskell If you have the `nix` package manager installed, you can create an IHaskell
......
FROM fpco/stack-build:lts-11.1
# docker build -t ihaskell-dev docker
# Install all necessary Ubuntu packages
RUN apt-get update && apt-get install -y python3-pip libgmp-dev libmagic-dev libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libblas-dev liblapack-dev gcc g++ && \
rm -rf /var/lib/apt/lists/*
# Install Jupyter notebook
RUN pip3 install -U jupyter
ENV LANG en_US.UTF-8
EXPOSE 8888
...@@ -31,6 +31,11 @@ extra-deps: ...@@ -31,6 +31,11 @@ extra-deps:
- mfsolve-0.3.2.0 - mfsolve-0.3.2.0
- fast-math-1.0.2 - fast-math-1.0.2
docker:
repo: "ihaskell-dev:latest"
enable: false
run-args: ["--net=bridge", "-p8888:8888"]
nix: nix:
enable: false enable: false
packages: packages:
......
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