File tree Expand file tree Collapse file tree 4 files changed +55
-2
lines changed
Expand file tree Collapse file tree 4 files changed +55
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ A Docker image for run Ansible 2.2 on Jupyter 4.2 (ipython notebook).
44
55- ` alpine-3.4 ` , ` latest ` ([ alpine/Dockerfile
66] ( https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/alpine/Dockerfile ) )
7+ - ` debian-8 ` ([ debian-8/Dockerfile
8+ ] ( https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/debian-8/Dockerfile ) )
79- ` ubuntu-14.04 ` ([ ubuntu-14.04/Dockerfile
810] ( https://github.com/chusiang/ansible-jupyter.dockerfile/blob/master/ubuntu-14.04/Dockerfile ) )
911- ` ubuntu-16.04 ` ([ ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change 1+ FROM debian:8
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
Original file line number Diff line number Diff line change 2424 with_nested : " {{ os_packages }}"
2525 when :
2626 - os_packages is defined
27- - ansible_distribution == "Alpine "
27+ - ansible_pkg_mgr == "apk "
2828
2929 - name : install some apt packages
3030 apt : name={{ item }} state=latest
3131 with_nested : " {{ os_packages }}"
3232 when :
3333 - os_packages is defined
34- - ansible_distribution == "Ubuntu "
34+ - ansible_pkg_mgr == "apt "
3535
3636 - name : install some pip packages
3737 pip : name={{ item }} state=latest
You can’t perform that action at this time.
0 commit comments