Show More
@@ -1,35 +1,43 | |||
|
1 | 1 | # Designed to be run as |
|
2 | 2 | # |
|
3 | 3 | # docker run -it -p 9999:8888 ipython/latest |
|
4 | 4 | |
|
5 | 5 | FROM ipython/scipystack |
|
6 | 6 | |
|
7 | 7 | MAINTAINER IPython Project <ipython-dev@scipy.org> |
|
8 | 8 | |
|
9 | 9 | ADD . /srv/ipython/ |
|
10 | 10 | WORKDIR /srv/ipython/ |
|
11 | 11 | |
|
12 | # Installing certain dependencies directly | |
|
12 | 13 | RUN pip2 install fabric |
|
13 | 14 | RUN pip3 install jsonschema jsonpointer fabric |
|
14 | 15 | |
|
16 | RUN git submodule update --init | |
|
17 | ||
|
18 | # .[all] only works with -e | |
|
19 | # Can't use -e because ipython2 and ipython3 will clobber each other | |
|
15 | 20 | RUN pip2 install . |
|
16 | 21 | RUN pip3 install . |
|
17 | 22 | |
|
18 | 23 | EXPOSE 8888 |
|
19 | 24 | |
|
25 | # Generate a wrapper script | |
|
20 | 26 | RUN echo "#!/bin/bash\nipython3 notebook --no-browser --port 8888 --ip=0.0.0.0" > /usr/local/bin/notebook.sh |
|
21 | 27 | RUN chmod a+x /usr/local/bin/notebook.sh |
|
22 | 28 | |
|
29 | # jupyter is our user | |
|
23 | 30 | RUN useradd -m -s /bin/bash jupyter |
|
24 | 31 | |
|
25 | 32 | USER jupyter |
|
26 | 33 | ENV HOME /home/jupyter |
|
27 | 34 | ENV SHELL /bin/bash |
|
28 | 35 | ENV USER jupyter |
|
29 | 36 | |
|
30 | 37 | WORKDIR /home/jupyter/ |
|
31 | 38 | |
|
39 | # Register each kernel (Python 2.7.x, Python 3.4.x) | |
|
32 | 40 | RUN ipython2 kernelspec install-self |
|
33 | 41 | RUN ipython3 kernelspec install-self |
|
34 | 42 | |
|
35 | 43 | CMD ["/usr/local/bin/notebook.sh"] |
General Comments 0
You need to be logged in to leave comments.
Login now