common.*: Clearly differentiate runtime and buildtime scripts

Simplify all common.* files by simply removing the "buildscripts" directory
instead of listing each script one by one.
This commit is contained in:
Jean-Christophe Fillion-Robin 2018-06-06 20:17:10 -04:00
parent 2a425ac1ad
commit 5f5a890714
No known key found for this signature in database
GPG Key ID: BAF1E1AEB9097A41
3 changed files with 29 additions and 35 deletions

View File

@ -1,7 +1,8 @@
RUN REPO=http://cdn-fastly.deb.debian.org && \ RUN REPO=http://cdn-fastly.deb.debian.org && \
echo "deb $REPO/debian jessie main\ndeb $REPO/debian jessie-updates main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list echo "deb $REPO/debian jessie main\ndeb $REPO/debian jessie-updates main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list
COPY imagefiles/install-gosu-binary.sh /dockcross/ # Image build scripts
COPY imagefiles/install-gosu-binary.sh /buildscripts/
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@ -39,6 +40,6 @@ RUN \
zlib1g-dev \ zlib1g-dev \
&& \ && \
apt-get clean --yes && \ apt-get clean --yes && \
/dockcross/install-gosu-binary.sh && \ /buildscripts/install-gosu-binary.sh && \
rm /dockcross/install-gosu-binary.sh rm -rf /buildscripts

View File

@ -3,6 +3,7 @@ WORKDIR /usr/src
ARG GIT_VERSION=2.16.2 ARG GIT_VERSION=2.16.2
ARG CMAKE_VERSION=3.11.0 ARG CMAKE_VERSION=3.11.0
# Image build scripts
COPY \ COPY \
imagefiles/build-and-install-git.sh \ imagefiles/build-and-install-git.sh \
imagefiles/utils.sh \ imagefiles/utils.sh \
@ -13,41 +14,29 @@ COPY \
imagefiles/install-liquidprompt-binary.sh \ imagefiles/install-liquidprompt-binary.sh \
imagefiles/build-and-install-curl.sh \ imagefiles/build-and-install-curl.sh \
imagefiles/build-and-install-ninja.sh \ imagefiles/build-and-install-ninja.sh \
/dockcross/ /buildscripts/
RUN \ RUN \
if [ "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux-x86" ]; then \ if [ "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux-x86" ]; then \
/dockcross/build-and-install-openssl.sh -32 && \ /buildscripts/build-and-install-openssl.sh -32 && \
/dockcross/build-and-install-openssh.sh && \ /buildscripts/build-and-install-openssh.sh && \
/dockcross/build-and-install-curl.sh && \ /buildscripts/build-and-install-curl.sh && \
/dockcross/build-and-install-git.sh && \ /buildscripts/build-and-install-git.sh && \
/dockcross/build-and-install-cmake.sh -32 || exit 1; \ /buildscripts/build-and-install-cmake.sh -32 || exit 1; \
else \ else \
/dockcross/build-and-install-openssl.sh && \ /buildscripts/build-and-install-openssl.sh && \
/dockcross/build-and-install-openssh.sh && \ /buildscripts/build-and-install-openssh.sh && \
/dockcross/build-and-install-curl.sh && \ /buildscripts/build-and-install-curl.sh && \
/dockcross/build-and-install-git.sh && \ /buildscripts/build-and-install-git.sh && \
/dockcross/install-cmake-binary.sh || exit 1; \ /buildscripts/install-cmake-binary.sh || exit 1; \
fi; \ fi; \
/dockcross/install-liquidprompt-binary.sh && \ /buildscripts/install-liquidprompt-binary.sh && \
PYTHON=$([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \ 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} && \ /buildscripts/build-and-install-ninja.sh -python ${PYTHON} && \
rm \ rm -rf /buildscripts \
/dockcross/build-and-install-git.sh \
/dockcross/utils.sh \
/dockcross/build-and-install-openssl.sh \
/dockcross/build-and-install-openssh.sh \
/dockcross/build-and-install-cmake.sh \
/dockcross/install-cmake-binary.sh \
/dockcross/install-liquidprompt-binary.sh \
/dockcross/build-and-install-curl.sh \
/dockcross/build-and-install-ninja.sh \
&& \ && \
${PYTHON} -m pip install --ignore-installed conan ${PYTHON} -m pip install --ignore-installed conan
COPY imagefiles/cmake.sh /usr/local/bin/cmake
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
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 \
@ -60,4 +49,7 @@ RUN echo "root:root" | chpasswd
WORKDIR /work WORKDIR /work
ENTRYPOINT ["/dockcross/entrypoint.sh"] ENTRYPOINT ["/dockcross/entrypoint.sh"]
# Runtime scripts
COPY imagefiles/cmake.sh /usr/local/bin/cmake
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/ COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/

View File

@ -1,8 +1,8 @@
# Image build scripts
COPY \ COPY \
imagefiles/install-gosu-binary.sh \ imagefiles/install-gosu-binary.sh \
manylinux-common/install-python-packages.sh \ manylinux-common/install-python-packages.sh \
manylinux-common/pre_exec.sh \ /buildscripts/
/dockcross/
RUN \ RUN \
set -x && \ set -x && \
@ -16,11 +16,12 @@ RUN \
zip \ zip \
&& \ && \
yum clean all && \ yum clean all && \
/dockcross/install-gosu-binary.sh && \ /buildscripts/install-gosu-binary.sh && \
rm /dockcross/install-gosu-binary.sh && \
# Remove sudo provided by "devtoolset-2" since it doesn't work with # Remove sudo provided by "devtoolset-2" since it doesn't work with
# our sudo wrapper calling gosu. # our sudo wrapper calling gosu.
rm /opt/rh/devtoolset-2/root/usr/bin/sudo && \ rm /opt/rh/devtoolset-2/root/usr/bin/sudo && \
/dockcross/install-python-packages.sh && \ /buildscripts/install-python-packages.sh && \
rm /dockcross/install-python-packages.sh rm -rf /buildscripts
# Runtime scripts
COPY manylinux-common/pre_exec.sh /dockcross/