File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM debian:7
2+
3+ MAINTAINER Chu-Siang Lai <chusiang@drx.tw>
4+
5+ # Install the requires apt package and python.
6+ RUN apt-get update
7+
8+ RUN apt-get install -y --no-install-recommends \
9+ linux-headers-amd64 gcc build-essential python python-pip python-dev \
10+ libffi-dev libssl-dev \
11+ && \
12+ apt-get clean
13+
14+ # Upgrade the pip to lastest.
15+ RUN pip install -U pip
16+
17+ # Setup the ansible.
18+ RUN pip install ansible
19+
20+ # for disable localhost warning message.
21+ RUN mkdir /etc/ansible && \
22+ /bin/echo -e "[local]\n localhost ansible_connection=local" > /etc/ansible/hosts
23+
24+ # Setup with Ansible.
25+ ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home
26+ RUN ansible-playbook -vvvv /home/setup_jupyter.yml
27+
28+ # Copy a ipython notebook example to image.
29+ ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/
30+
31+ # Run service of Jupyter.
32+ COPY docker-entrypoint.sh /usr/local/bin/
33+ ENTRYPOINT [ "docker-entrypoint.sh" ]
34+ EXPOSE 8888
35+
36+ CMD [ "jupyter" , "--version" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # ============================================================
3+ # Author: Chu-Siang Lai / chusiang (at) drx.tw
4+ # Blog: http://note.drx.tw
5+ # Filename: docker-entrypoint.sh
6+ # Modified: 2016-11-20 18:43
7+ # Description: Run the jupyter service.
8+ #
9+ # --ip 0.0.0.0: Allow all IP access.
10+ # --no-browser: Don't open browser from command line.
11+ # --notebook-dir: Bunding the workdir.
12+ #
13+ # ===========================================================
14+
15+ jupyter-notebook --ip 0.0.0.0 --no-browser --notebook-dir=/home
You can’t perform that action at this time.
0 commit comments