common.docker: Optimize image size building "ninja" in existing RUN command

This commit is contained in:
Jean-Christophe Fillion-Robin 2018-06-05 01:19:46 -04:00
parent 4dce58cfec
commit 4dd933c35b
No known key found for this signature in database
GPG Key ID: BAF1E1AEB9097A41

View File

@ -11,6 +11,7 @@ COPY \
imagefiles/build-and-install-cmake.sh \ imagefiles/build-and-install-cmake.sh \
imagefiles/install-cmake-binary.sh \ imagefiles/install-cmake-binary.sh \
imagefiles/build-and-install-curl.sh \ imagefiles/build-and-install-curl.sh \
imagefiles/build-and-install-ninja.sh \
/dockcross/ /dockcross/
RUN \ RUN \
@ -27,6 +28,8 @@ RUN \
/dockcross/build-and-install-git.sh && \ /dockcross/build-and-install-git.sh && \
/dockcross/install-cmake-binary.sh || exit 1; \ /dockcross/install-cmake-binary.sh || exit 1; \
fi; \ 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 \ rm \
/dockcross/build-and-install-git.sh \ /dockcross/build-and-install-git.sh \
/dockcross/utils.sh \ /dockcross/utils.sh \
@ -34,18 +37,13 @@ RUN \
/dockcross/build-and-install-openssh.sh \ /dockcross/build-and-install-openssh.sh \
/dockcross/build-and-install-cmake.sh \ /dockcross/build-and-install-cmake.sh \
/dockcross/install-cmake-binary.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/cmake.sh /usr/local/bin/cmake
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
COPY imagefiles/sudo.sh /usr/bin/sudo 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 \ 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 ; \ : nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \
else \ else \