Skip to content

Commit 038fe5f

Browse files
committed
add Dockerfile for Debian 7
1 parent 22dfa4e commit 038fe5f

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

debian-7/Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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]\nlocalhost 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" ]

debian-7/docker-entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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

0 commit comments

Comments
 (0)