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 && \
\
\
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