Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize size and time using "--no-cache-dir" #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions 1.9-alpine3-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
apk --update add python py-pip openssl ca-certificates && \
apk --update add --virtual build-dependencies \
python-dev libffi-dev openssl-dev build-base && \
pip install --upgrade pip pycrypto cffi && \
pip install --upgrade pip && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==1.9.4 && \
pip install --no-cache-dir ansible==1.9.4 && \
\
\
echo "===> Removing package list..." && \
Expand Down
5 changes: 3 additions & 2 deletions 1.9-alpine3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
apk --update add python py-pip openssl ca-certificates && \
apk --update add --virtual build-dependencies \
python-dev libffi-dev openssl-dev build-base && \
pip install --upgrade pip pycrypto cffi && \
pip install --upgrade pip && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==1.9.4 && \
pip install --no-cache-dir ansible==1.9.4 && \
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
Expand Down
6 changes: 3 additions & 3 deletions 1.9-debian8-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade setuptools && \
pip install --upgrade pycrypto cffi && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==1.9.4 && \
pip install --no-cache-dir ansible==1.9.4 && \
\
\
echo "===> Removing unused APT resources..." && \
Expand Down
6 changes: 3 additions & 3 deletions 1.9-debian8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade setuptools && \
pip install --upgrade pycrypto cffi && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==1.9.4 && \
pip install --no-cache-dir ansible==1.9.4 && \
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
Expand Down
5 changes: 3 additions & 2 deletions alpine3-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
apk --update add python py-pip openssl ca-certificates && \
apk --update add --virtual build-dependencies \
python-dev libffi-dev openssl-dev build-base && \
pip install --upgrade pip pycrypto cffi && \
pip install --upgrade pip && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
pip install --no-cache-dir ansible && \
\
\
echo "===> Removing package list..." && \
Expand Down
7 changes: 4 additions & 3 deletions alpine3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
apk --update add python py-pip openssl ca-certificates && \
apk --update add --virtual build-dependencies \
python-dev libffi-dev openssl-dev build-base && \
pip install --upgrade pip cffi && \
pip install --upgrade pip && \
pip install --no-cache-dir --upgrade cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
pip install --no-cache-dir ansible && \
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
pip install --upgrade pycrypto pywinrm && \
pip install --no-cache-dir --upgrade pycrypto pywinrm && \
apk --update add sshpass openssh-client rsync && \
\
\
Expand Down
2 changes: 1 addition & 1 deletion centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RUN echo "===> Enabling systemd..." && \
\
echo "===> Installing handy tools (not absolutely required)..." && \
yum -y install python-pip && \
pip install --upgrade pywinrm && \
pip install --no-cache-dir --upgrade pywinrm && \
yum -y install sshpass openssh-clients && \
\
\
Expand Down
6 changes: 3 additions & 3 deletions debian8-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade setuptools && \
pip install --upgrade pycrypto cffi && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
pip install --no-cache-dir ansible && \
\
\
echo "===> Removing unused APT resources..." && \
Expand Down
8 changes: 4 additions & 4 deletions debian8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade setuptools && \
pip install --upgrade pycrypto && \
pip install --upgrade cffi pywinrm && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir --upgrade pycrypto && \
pip install --no-cache-dir --upgrade cffi pywinrm && \
\
\
echo "===> Fix strange bug under Jessie: cannot import name IncompleteRead" && \
easy_install -U pip && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
pip install --no-cache-dir ansible && \
\
\
\
Expand Down
4 changes: 2 additions & 2 deletions debian9-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade pycrypto cffi && \
pip install --no-cache-dir --upgrade pycrypto cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
pip install --no-cache-dir ansible && \
\
\
echo "===> Removing unused APT resources..." && \
Expand Down
4 changes: 2 additions & 2 deletions debian9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ RUN echo "===> Installing python, sudo, and supporting tools..." && \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev && \
apt-get -y --purge remove python-cffi && \
pip install --upgrade pycrypto cffi pywinrm && \
pip install --no-cache-dir --upgrade pycrypto cffi pywinrm && \
\
\
\
echo "===> Installing Ansible..." && \
pip install ansible && \
pip install --no-cache-dir ansible && \
\
\
\
Expand Down
2 changes: 1 addition & 1 deletion master-centos7-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN echo "===> Enabling systemd..." && \
libxml2 libxml2-devel libxslt libxslt-devel \
git sudo curl && \
pip install --upgrade pip && \
pip install --upgrade \
pip install --no-cache-dir --upgrade \
pyyaml jinja2 pycrypto paramiko httplib2 && \
\
\
Expand Down
4 changes: 2 additions & 2 deletions master-centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ RUN echo "===> Enabling systemd..." && \
libxml2 libxml2-devel libxslt libxslt-devel \
git sudo curl && \
pip install --upgrade pip && \
pip install --upgrade \
pip install --no-cache-dir --upgrade \
pyyaml jinja2 pycrypto paramiko httplib2 && \
pip install --upgrade pywinrm && \
pip install --no-cache-dir --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
4 changes: 2 additions & 2 deletions master-debian8-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
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 && \
pip install --no-cache-dir --upgrade cffi pywinrm && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
4 changes: 2 additions & 2 deletions master-debian8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
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 && \
pip install --no-cache-dir --upgrade cffi pywinrm && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
6 changes: 3 additions & 3 deletions master-debian9-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
echo "--> Upgrading pip..." && \
# @see https://github.com/pypa/pip/issues/5240#issuecomment-383129401 && \
python -m pip install --upgrade pip && \
pip install --upgrade setuptools wheel && \
pip install --upgrade cffi && \
pip install --upgrade pyyaml jinja2 pycrypto && \
pip install --no-cache-dir --upgrade setuptools wheel && \
pip install --no-cache-dir --upgrade cffi && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
6 changes: 3 additions & 3 deletions master-debian9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
echo "--> Upgrading pip..." && \
# @see https://github.com/pypa/pip/issues/5240#issuecomment-383129401 && \
python -m pip install --upgrade pip && \
pip install --upgrade setuptools wheel && \
pip install --upgrade cffi pywinrm && \
pip install --upgrade pyyaml jinja2 pycrypto && \
pip install --no-cache-dir --upgrade setuptools wheel && \
pip install --no-cache-dir --upgrade cffi pywinrm && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
6 changes: 3 additions & 3 deletions master-ubuntu16.04-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
echo "--> Upgrading pip..." && \
# @see https://github.com/pypa/pip/issues/5240#issuecomment-383129401 && \
python -m pip install --upgrade pip && \
pip install --upgrade setuptools wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
pip install --upgrade pywinrm && \
pip install --no-cache-dir --upgrade setuptools wheel && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
pip install --no-cache-dir --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
6 changes: 3 additions & 3 deletions master-ubuntu16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
echo "--> Upgrading pip..." && \
# @see https://github.com/pypa/pip/issues/5240#issuecomment-383129401 && \
python -m pip install --upgrade pip && \
pip install --upgrade setuptools wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
pip install --upgrade pywinrm && \
pip install --no-cache-dir --upgrade setuptools wheel && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
pip install --no-cache-dir --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
6 changes: 3 additions & 3 deletions master-ubuntu18.04-onbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
echo "--> Upgrading pip..." && \
# @see https://github.com/pypa/pip/issues/5240#issuecomment-383129401 && \
python -m pip install --upgrade pip && \
pip install --upgrade setuptools wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
pip install --upgrade pywinrm && \
pip install --no-cache-dir --upgrade setuptools wheel && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
pip install --no-cache-dir --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
6 changes: 3 additions & 3 deletions master-ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN echo "===> Adding Ansible's prerequisites..." && \
echo "--> Upgrading pip..." && \
# @see https://github.com/pypa/pip/issues/5240#issuecomment-383129401 && \
python -m pip install --upgrade pip && \
pip install --upgrade setuptools wheel && \
pip install --upgrade pyyaml jinja2 pycrypto && \
pip install --upgrade pywinrm && \
pip install --no-cache-dir --upgrade setuptools wheel && \
pip install --no-cache-dir --upgrade pyyaml jinja2 pycrypto && \
pip install --no-cache-dir --upgrade pywinrm && \
\
\
echo "===> Downloading Ansible's source tree..." && \
Expand Down
4 changes: 2 additions & 2 deletions mini-alpine3/install-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ cat ___APK_INSTALL_LIST | \

cat ___PIP_INSTALL_LIST | \
while read ITEM; do
pip install --upgrade $ITEM
pip install --no-cache-dir --upgrade $ITEM
done


echo "===> Installing Ansible..."
pip install ansible
pip install --no-cache-dir ansible


echo "===> Adding hosts for convenience..." && \
Expand Down
2 changes: 1 addition & 1 deletion ubuntu14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN echo "===> Adding Ansible's PPA..." && \
\
echo "===> Installing handy tools (not absolutely required)..." && \
#apt-get install -y python-pip && \
#pip install --upgrade pywinrm && \
#pip install --no-cache-dir --upgrade pywinrm && \
apt-get install -y sshpass openssh-client && \
\
\
Expand Down
2 changes: 1 addition & 1 deletion ubuntu16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN echo "===> Adding Ansible's PPA..." && \
\
echo "===> Installing handy tools (not absolutely required)..." && \
apt-get install -y python-pip && \
pip install --upgrade pycrypto pywinrm && \
pip install --no-cache-dir --upgrade pycrypto pywinrm && \
apt-get install -y sshpass openssh-client && \
\
\
Expand Down
2 changes: 1 addition & 1 deletion ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN echo "===> Adding Ansible's PPA..." && \
\
echo "===> Installing handy tools (not absolutely required)..." && \
apt-get install -y python-pip && \
pip install --upgrade pycrypto pywinrm && \
pip install --no-cache-dir --upgrade pycrypto pywinrm && \
apt-get install -y sshpass openssh-client && \
\
\
Expand Down