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