-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
33 lines (23 loc) · 972 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM gentoo/stage3-amd64
MAINTAINER Chu-Siang Lai <chusiang@drx.tw>
# Update the index of available packages.
RUN emerge --sync
# Install the requires portage package and python.
RUN emerge python:2.7 dev-python/pip gentoolkit
# switch python to v2.7.
RUn eselect python set 1
# Setup the ansible.
RUN emerge ansible
# for disable localhost warning message.
RUN mkdir /etc/ansible && \
/bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# Setup with Ansible.
ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home
RUN ansible-playbook -vvvv /home/setup_jupyter.yml
# Copy a ipython notebook example to image.
ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/
# Run service of Jupyter.
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT [ "docker-entrypoint.sh" ]
EXPOSE 8888
CMD [ "jupyter", "--version" ]