]> git.immae.eu Git - github/fretlink/docker-ansible.git/blobdiff - master-debian8-onbuild/Dockerfile
debian9: use "slim" version of debian image
[github/fretlink/docker-ansible.git] / master-debian8-onbuild / Dockerfile
index d8e88026a0c825839773199b72dd043eef5e7643..79b8ec972f879cff3c623f76cb57b81feadaa916 100644 (file)
@@ -12,14 +12,22 @@ FROM debian:jessie
 MAINTAINER William Yeh <william.pjyeh@gmail.com>
 
 
-RUN echo "===> Adding Ansible's prerequisites..."   && \
-    apt-get update -y            && \
+RUN echo "===> Adding Ansible's prerequisites..."         && \
+    apt-get update -y  &&  apt-get install --fix-missing  && \
     DEBIAN_FRONTEND=noninteractive  \
         apt-get install --no-install-recommends -y -q  \
                 build-essential ca-certificates        \
-                python-pip python-dev python-yaml      \
+                python python-pip python-dev           \
+                libffi-dev libssl-dev                  \
                 libxml2-dev libxslt1-dev zlib1g-dev    \
                 git sudo curl                       && \
+    apt-get -y --purge remove python-cffi           && \
+    \
+    \
+    echo "===> Fix strange bug under Jessie: cannot import name IncompleteRead"  && \
+    easy_install -U pip    && \
+    \
+    pip install --upgrade cffi pywinrm              && \
     pip install --upgrade pyyaml jinja2 pycrypto    && \
     \
     \
@@ -40,16 +48,16 @@ RUN echo "===> Adding Ansible's prerequisites..."   && \
     rm -rf /ansible                      && \
     \
     \
-    echo "===> Clean up..."                                         && \
+    echo "===> Clean up..."                                                  && \
     apt-get remove -y --auto-remove \
-            build-essential python-pip python-dev git               && \
-    apt-get clean                                                   && \
-    rm -rf /var/lib/apt/lists/*                                     && \
+            build-essential python-pip python-dev git libffi-dev libssl-dev  && \
+    apt-get clean                                                            && \
+    rm -rf /var/lib/apt/lists/*                                              && \
     \
     \
     echo "===> Adding hosts for convenience..."  && \
     mkdir -p /etc/ansible                        && \
-    echo '[local]\nlocalhost\n' > /etc/ansible/hosts
+    echo 'localhost' > /etc/ansible/hosts
 
 
 ENV PATH        /opt/ansible/bin:$PATH