Skip to content

Commit 94e9a7d

Browse files
committed
finish the opensuse-42.1 Dockerfile
Thanks for @sakanamax, it's green, now !
1 parent d3eef63 commit 94e9a7d

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

opensuse-42.1/Dockerfile

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,27 @@ FROM opensuse:42.1
22

33
MAINTAINER Chu-Siang Lai <chusiang@drx.tw>
44

5-
# Install the requires apt package and python.
5+
# Install the requires package and python.
6+
RUN zypper addrepo -Gf http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.1/ systemsmanagement
67
RUN zypper update -y
78
RUN zypper install -y \
89
kernel-devel gcc python python-pip python-devel \
910
libffi-devel-gcc5 libopenssl-devel libzmq5 \
1011
&& \
1112
zypper clean -a
12-
#libffi-devel-gcc5 libopenssl-devel xmlsec1-openssl-devel \
1313

14-
# Make the Ansible 2.0+.
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
14+
# Install the Ansible 2.0+
15+
RUN zypper install -y ansible-2.2.0.0-56.1
2116

2217
# for disable localhost warning message.
2318
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
2419

2520
# Upgrade the pip to lastest.
2621
RUN pip install -U pip
2722

28-
# Setup with Anaconda2.
29-
#ADD https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
30-
COPY Anaconda2-4.2.0-Linux-x86_64.sh /home
31-
RUN bash /home/Anaconda2-4.2.0-Linux-x86_64.sh -b -f -p /opt/anaconda2 && \
32-
rm -f /home/Anaconda2-4.2.0-Linux-x86_64.sh && \
33-
echo "PATH=$PATH:/opt/anaconda2/bin/:/opt/anaconda2/sbin/" > ~/.bashrc
23+
# Setup with Ansible.
24+
ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/setup_jupyter.yml /home
25+
RUN ansible-playbook -vvvv /home/setup_jupyter.yml
3426

3527
# Copy a ipython notebook example to image.
3628
ADD https://raw.githubusercontent.com/chusiang/ansible-jupyter.dockerfile/master/ipynb/ansible_on_jupyter.ipynb /home/

setup_jupyter.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
yum_packages:
2222
- openssh-clients
2323
- vim-minimal
24-
24+
25+
zypper_packages:
26+
- openssh
27+
- vim
28+
2529
pip_packages:
2630
- docker-py
2731
- docker-compose
@@ -54,12 +58,19 @@
5458
- yum_packages is defined
5559
- ansible_pkg_mgr == "yum"
5660

57-
- name: install some pip packages
61+
- name: install zypper packages
62+
zypper: name={{ item }} state=latest
63+
with_nested: "{{ zypper_packages }}"
64+
when:
65+
- zypper_packages is defined
66+
- ansible_pkg_mgr == "zypper"
67+
68+
- name: install pip packages
5869
pip: name={{ item }} state=latest
5970
with_nested: "{{ pip_packages }}"
6071
when: pip_packages is defined
6172

62-
- name: install the jupyter
73+
- name: install the jupyter notebook
6374
pip: name=jupyter version=1.0.0 state=present
6475

6576
# vim:ft=ansible :

0 commit comments

Comments
 (0)