From 9bbe752b27a3e7d245502c9aee36174700b727f6 Mon Sep 17 00:00:00 2001 From: micafer Date: Mon, 18 Dec 2017 15:01:51 +0100 Subject: [PATCH] Decrease docker image size --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 043c23403..781988701 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,13 +18,13 @@ RUN pip install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-co RUN apt-get update && apt-get install --no-install-recommends -y gcc libmysqld-dev libssl-dev libffi-dev libsqlite3-dev && \ pip install MySQL-python && \ pip install IM==1.6.6 && \ - apt-get remove -y gcc libmysqld-dev libssl-dev libffi-dev libsqlite3-dev python-dev python-pip && \ - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* + apt-get purge -y gcc libmysqld-dev libssl-dev libffi-dev libsqlite3-dev python-dev python-pip && \ + apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/ # Remove pip requests and force python-requests to be installed to avoid SSL ca errors RUN pip uninstall -y requests -RUN apt-get update && apt-get install --no-install-recommends -y python-requests && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install --no-install-recommends -y python-requests && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/ # Copy a ansible.cfg with correct minimum values COPY ansible.cfg /etc/ansible/ansible.cfg