##// END OF EJS Templates
Switch back to ADD
Kyle Kelley -
Show More
@@ -1,42 +1,42 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 # Can't directly add the source as it won't have the submodules
9 # Can't directly add the source as it won't have the submodules
10 RUN mkdir -p /srv/
10 RUN mkdir -p /srv/
11 WORKDIR /srv/
11 WORKDIR /srv/
12 RUN git clone --recursive https://github.com/ipython/ipython.git
12 ADD . /srv/ipython
13 WORKDIR /srv/ipython/
13 WORKDIR /srv/ipython/
14
14
15 # Installing certain dependencies directly
15 # Installing certain dependencies directly
16 RUN pip2 install fabric
16 RUN pip2 install fabric
17 RUN pip3 install jsonschema jsonpointer fabric
17 RUN pip3 install jsonschema jsonpointer fabric
18
18
19 RUN python setup.py submodule
19 RUN python setup.py submodule
20
20
21 # .[all] only works with -e
21 # .[all] only works with -e
22 # 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
23 RUN pip2 install .
23 RUN pip2 install .
24 RUN pip3 install .
24 RUN pip3 install .
25
25
26 EXPOSE 8888
26 EXPOSE 8888
27
27
28 # Generate a wrapper script
28 # Generate a wrapper script
29 RUN echo "#!/bin/bash\nipython2 kernelspec install-self\nipython3 kernelspec install-self\nipython3 notebook --no-browser --port 8888 --ip=0.0.0.0" > /usr/local/bin/notebook.sh
29 RUN echo "#!/bin/bash\nipython2 kernelspec install-self\nipython3 kernelspec install-self\nipython3 notebook --no-browser --port 8888 --ip=0.0.0.0" > /usr/local/bin/notebook.sh
30 RUN chmod a+x /usr/local/bin/notebook.sh
30 RUN chmod a+x /usr/local/bin/notebook.sh
31
31
32 # jupyter is our user
32 # jupyter is our user
33 RUN useradd -m -s /bin/bash jupyter
33 RUN useradd -m -s /bin/bash jupyter
34
34
35 USER jupyter
35 USER jupyter
36 ENV HOME /home/jupyter
36 ENV HOME /home/jupyter
37 ENV SHELL /bin/bash
37 ENV SHELL /bin/bash
38 ENV USER jupyter
38 ENV USER jupyter
39
39
40 WORKDIR /home/jupyter/
40 WORKDIR /home/jupyter/
41
41
42 CMD ["/usr/local/bin/notebook.sh"]
42 CMD ["/usr/local/bin/notebook.sh"]
General Comments 0
You need to be logged in to leave comments. Login now