File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM opensuse:42.1
2+
3+ MAINTAINER Chu-Siang Lai <chusiang@drx.tw>
4+
5+ # Install the requires apt package and python.
6+ RUN zypper update -y
7+ RUN zypper install -y \
8+ kernel-devel gcc python python-pip python-devel \
9+ libffi-devel-gcc5 libopenssl-devel libzmq5 \
10+ && \
11+ zypper clean -a
12+ # libffi-devel-gcc5 libopenssl-devel xmlsec1-openssl-devel \
13+
14+ # Setup the ansible.
15+ RUN zypper install -y \
16+ rpm-build make asciidoc git python-setuptools python-devel \
17+ python-Jinja2 python-httplib2 python-keyczar python-six python-paramiko python-yaml sshpass
18+ RUN git clone git://github.com/ansible/ansible.git --recursive
19+ RUN cd ansible/ && make rpm && \
20+ rpm -ivh rpm-build/ansible-*.git*.noarch.rpm
21+
22+ # for disable localhost warning message.
23+ RUN /bin/echo -e "[local]\n localhost ansible_connection=local" > /etc/ansible/hosts
24+
25+ # Upgrade the pip to lastest.
26+ RUN pip install -U pip
27+
28+ # Setup with Ansible.
29+ # ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home
30+ ADD setup_jupyter.yml /home
31+ RUN ansible-playbook -vvvv /home/setup_jupyter.yml
32+
33+ # Copy a ipython notebook example to image.
34+ ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/
35+
36+ # Run service of Jupyter.
37+ COPY docker-entrypoint.sh /usr/local/bin/
38+ ENTRYPOINT [ "docker-entrypoint.sh" ]
39+ EXPOSE 8888
40+
41+ 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