From 4dd933c35b9363cc26fa891ef9a38891e9ce8697 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 5 Jun 2018 01:19:46 -0400 Subject: [PATCH] common.docker: Optimize image size building "ninja" in existing RUN command --- common.docker | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/common.docker b/common.docker index 0cbd718..51a6377 100644 --- a/common.docker +++ b/common.docker @@ -11,6 +11,7 @@ COPY \ imagefiles/build-and-install-cmake.sh \ imagefiles/install-cmake-binary.sh \ imagefiles/build-and-install-curl.sh \ + imagefiles/build-and-install-ninja.sh \ /dockcross/ RUN \ @@ -27,6 +28,8 @@ RUN \ /dockcross/build-and-install-git.sh && \ /dockcross/install-cmake-binary.sh || exit 1; \ fi; \ + PYTHON=$([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \ + /dockcross/build-and-install-ninja.sh -python ${PYTHON} && \ rm \ /dockcross/build-and-install-git.sh \ /dockcross/utils.sh \ @@ -34,18 +37,13 @@ RUN \ /dockcross/build-and-install-openssh.sh \ /dockcross/build-and-install-cmake.sh \ /dockcross/install-cmake-binary.sh \ - /dockcross/build-and-install-curl.sh + /dockcross/build-and-install-curl.sh \ + /dockcross/build-and-install-ninja.sh COPY imagefiles/cmake.sh /usr/local/bin/cmake COPY imagefiles/ccmake.sh /usr/local/bin/ccmake COPY imagefiles/sudo.sh /usr/bin/sudo -COPY imagefiles/build-and-install-ninja.sh /dockcross/ -RUN \ - /dockcross/build-and-install-ninja.sh \ - -python $([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \ - rm /dockcross/build-and-install-ninja.sh - RUN if [ -e /opt/python/cp35-cp35m/bin/python ]; then \ : nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \ else \