diff --git a/Makefile b/Makefile index d9caa7d..992f84e 100644 --- a/Makefile +++ b/Makefile @@ -16,13 +16,13 @@ BIN = ./bin STANDARD_IMAGES = linux-s390x android-arm android-arm64 android-x86 android-x86_64 linux-x86 linux-x64 linux-arm64 linux-arm64-musl linux-armv5 linux-armv5-musl linux-armv6 linux-armv6-musl linux-armv7 linux-armv7a linux-armv7l-musl linux-mips linux-mipsel linux-ppc64le windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix # Generated Dockerfiles. -GEN_IMAGES = linux-s390x linux-mips manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 web-wasm linux-arm64 linux-arm64-musl windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-armv7 linux-armv7a linux-armv7l-musl linux-armv6-musl linux-armv5 linux-armv5-musl linux-ppc64le +GEN_IMAGES = linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-mips linux-mipsel manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 web-wasm linux-arm64 linux-arm64-musl windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-armv7 linux-armv7a linux-armv7l-musl linux-armv6 linux-armv6-musl linux-armv5 linux-armv5-musl linux-ppc64le GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) # These images are expected to have explicit rules for *both* build and testing NON_STANDARD_IMAGES = web-wasm manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 -DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross +DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross common.label-and-env # This list all available images IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) @@ -69,6 +69,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS -e '/common-manylinux.crosstool/ r common-manylinux.crosstool' \ -e '/common.windows/ r common.windows' \ -e '/common.dockcross/ r common.dockcross' \ + -e '/common.label-and-env/ r common.label-and-env' \ $< > $@ # diff --git a/android-arm/Dockerfile b/android-arm/Dockerfile.in similarity index 74% rename from android-arm/Dockerfile rename to android-arm/Dockerfile.in index d9dbcc2..43b8844 100644 --- a/android-arm/Dockerfile +++ b/android-arm/Dockerfile.in @@ -37,16 +37,4 @@ RUN mkdir -p /build && \ COPY Toolchain.cmake ${CROSS_ROOT}/ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/android-arm -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/android-arm64/Dockerfile b/android-arm64/Dockerfile.in similarity index 76% rename from android-arm64/Dockerfile rename to android-arm64/Dockerfile.in index 5fbb16f..1c0dee6 100644 --- a/android-arm64/Dockerfile +++ b/android-arm64/Dockerfile.in @@ -42,16 +42,4 @@ RUN mkdir -p /build && \ COPY Toolchain.cmake ${CROSS_ROOT}/ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/android-arm64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/common.label-and-env b/common.label-and-env new file mode 100644 index 0000000..f12de8b --- /dev/null +++ b/common.label-and-env @@ -0,0 +1,14 @@ +# Build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG IMAGE +ARG VERSION=latest +ARG VCS_REF +ARG VCS_URL +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.name=$IMAGE \ + org.label-schema.version=$VERSION \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url=$VCS_URL \ + org.label-schema.schema-version="1.0" + +ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} diff --git a/linux-arm64/Dockerfile.in b/linux-arm64/Dockerfile.in index 8da366d..bce7b35 100644 --- a/linux-arm64/Dockerfile.in +++ b/linux-arm64/Dockerfile.in @@ -36,16 +36,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm64 -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-arm64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-armv5-musl/Dockerfile.in b/linux-armv5-musl/Dockerfile.in index 51be452..9af04f1 100755 --- a/linux-armv5-musl/Dockerfile.in +++ b/linux-armv5-musl/Dockerfile.in @@ -38,16 +38,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-armv5-musl -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-armv5/Dockerfile.in b/linux-armv5/Dockerfile.in index 252ba27..e146905 100644 --- a/linux-armv5/Dockerfile.in +++ b/linux-armv5/Dockerfile.in @@ -40,16 +40,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-armv5 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-armv6/Dockerfile b/linux-armv6/Dockerfile.in similarity index 82% rename from linux-armv6/Dockerfile rename to linux-armv6/Dockerfile.in index e30a4eb..ff4076d 100644 --- a/linux-armv6/Dockerfile +++ b/linux-armv6/Dockerfile.in @@ -48,16 +48,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-armv6 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-armv7/Dockerfile.in b/linux-armv7/Dockerfile.in index 4380d2a..466ba2b 100644 --- a/linux-armv7/Dockerfile.in +++ b/linux-armv7/Dockerfile.in @@ -36,16 +36,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-armv7 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-armv7a/Dockerfile.in b/linux-armv7a/Dockerfile.in index 4902558..afa6f83 100644 --- a/linux-armv7a/Dockerfile.in +++ b/linux-armv7a/Dockerfile.in @@ -39,16 +39,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-armv7a -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-mips/Dockerfile.in b/linux-mips/Dockerfile.in index c8439d4..df06190 100644 --- a/linux-mips/Dockerfile.in +++ b/linux-mips/Dockerfile.in @@ -34,16 +34,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH mips -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-mips -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-mipsel/Dockerfile b/linux-mipsel/Dockerfile.in similarity index 76% rename from linux-mipsel/Dockerfile rename to linux-mipsel/Dockerfile.in index 40a6b39..b9a9ab3 100644 --- a/linux-mipsel/Dockerfile +++ b/linux-mipsel/Dockerfile.in @@ -37,16 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH mips -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-mipsel -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-ppc64le/Dockerfile.in b/linux-ppc64le/Dockerfile.in index 7f179e8..82dc8f3 100644 --- a/linux-ppc64le/Dockerfile.in +++ b/linux-ppc64le/Dockerfile.in @@ -51,17 +51,5 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH powerpc -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-ppc64le -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-s390x/Dockerfile.in b/linux-s390x/Dockerfile.in index 3ba3eb2..b925174 100644 --- a/linux-s390x/Dockerfile.in +++ b/linux-s390x/Dockerfile.in @@ -34,16 +34,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH s390 -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-s390x -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-x64/Dockerfile b/linux-x64/Dockerfile.in similarity index 60% rename from linux-x64/Dockerfile rename to linux-x64/Dockerfile.in index a9c1797..a966bdb 100644 --- a/linux-x64/Dockerfile +++ b/linux-x64/Dockerfile.in @@ -22,16 +22,4 @@ COPY ${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/ ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-x64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/linux-x86/Dockerfile b/linux-x86/Dockerfile.in similarity index 77% rename from linux-x86/Dockerfile rename to linux-x86/Dockerfile.in index f746e39..96fbdcc 100644 --- a/linux-x86/Dockerfile +++ b/linux-x86/Dockerfile.in @@ -43,16 +43,4 @@ ENV ARCH x86 COPY linux32-entrypoint.sh /dockcross/ ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"] -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/linux-x86 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/manylinux1-x64/Dockerfile.in b/manylinux1-x64/Dockerfile.in index 639c1c8..4a1f7ea 100644 --- a/manylinux1-x64/Dockerfile.in +++ b/manylinux1-x64/Dockerfile.in @@ -24,16 +24,4 @@ COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop COPY manylinux1-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/manylinux1-x64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/manylinux1-x86/Dockerfile.in b/manylinux1-x86/Dockerfile.in index a330b2f..98eacc2 100644 --- a/manylinux1-x86/Dockerfile.in +++ b/manylinux1-x86/Dockerfile.in @@ -27,16 +27,4 @@ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake COPY linux-x86/linux32-entrypoint.sh /dockcross/ ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"] -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/manylinux1-x86 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/manylinux2010-x64/Dockerfile.in b/manylinux2010-x64/Dockerfile.in index 6a29b54..c34c6e4 100644 --- a/manylinux2010-x64/Dockerfile.in +++ b/manylinux2010-x64/Dockerfile.in @@ -4,10 +4,82 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com" ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux2010-x64 #include "common.manylinux" +# Image build scripts +COPY \ + imagefiles/install-gosu-binary.sh \ + imagefiles/install-gosu-binary-wrapper.sh \ + manylinux-common/install-python-packages.sh \ + /buildscripts/ + +RUN \ + set -x && \ + yum -y install \ + epel-release \ + gpg \ + zlib-devel \ + gettext \ + openssh-clients \ + pax \ + wget \ + zip \ + && \ + yum clean all && \ + /buildscripts/install-gosu-binary.sh && \ + /buildscripts/install-gosu-binary-wrapper.sh && \ + # Remove sudo provided by "devtoolset-2" and "devtoolset-8" since it doesn't work with + # our sudo wrapper calling gosu. + rm -f /opt/rh/devtoolset-2/root/usr/bin/sudo && \ + rm -f /opt/rh/devtoolset-7/root/usr/bin/sudo && \ + rm -f /opt/rh/devtoolset-8/root/usr/bin/sudo && \ + /buildscripts/install-python-packages.sh && \ + rm -rf /buildscripts + +# Runtime scripts +COPY manylinux-common/pre_exec.sh /dockcross/ #include "common.dockcross" #include "common.docker" +WORKDIR /usr/src + +ARG GIT_VERSION=2.22.0 +ARG CMAKE_VERSION=3.17.1 + +# Image build scripts +COPY \ + imagefiles/build-and-install-cmake.sh \ + imagefiles/build-and-install-curl.sh \ + imagefiles/build-and-install-git.sh \ + imagefiles/build-and-install-ninja.sh \ + imagefiles/build-and-install-openssl.sh \ + imagefiles/build-and-install-openssh.sh \ + imagefiles/install-cmake-binary.sh \ + imagefiles/install-liquidprompt-binary.sh \ + imagefiles/install-python-packages.sh \ + imagefiles/utils.sh \ + /buildscripts/ + +RUN \ + X86_FLAG=$([ "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux1-x86" -o "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux2010-x86" ] && echo "-32" || echo "") && \ + /buildscripts/build-and-install-openssl.sh $X86_FLAG && \ + /buildscripts/build-and-install-openssh.sh && \ + /buildscripts/build-and-install-curl.sh && \ + /buildscripts/build-and-install-git.sh && \ + /buildscripts/install-cmake-binary.sh $X86_FLAG && \ + /buildscripts/install-liquidprompt-binary.sh && \ + PYTHON=$([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \ + /buildscripts/install-python-packages.sh -python ${PYTHON} && \ + /buildscripts/build-and-install-ninja.sh -python ${PYTHON} && \ + rm -rf /buildscripts + +RUN echo "root:root" | chpasswd +WORKDIR /work +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/ # Override yum to work around the problem with newly built libcurl.so.4 # https://access.redhat.com/solutions/641093 @@ -29,16 +101,4 @@ COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop COPY manylinux2010-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/manylinux2010-x64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/manylinux2010-x86/Dockerfile.in b/manylinux2010-x86/Dockerfile.in index f0a0b01..cca1248 100644 --- a/manylinux2010-x86/Dockerfile.in +++ b/manylinux2010-x86/Dockerfile.in @@ -32,16 +32,4 @@ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake COPY linux-x86/linux32-entrypoint.sh /dockcross/ ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"] -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/manylinux2010-x86 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/manylinux2014-x64/Dockerfile.in b/manylinux2014-x64/Dockerfile.in index 5805ac8..2dac6c1 100644 --- a/manylinux2014-x64/Dockerfile.in +++ b/manylinux2014-x64/Dockerfile.in @@ -30,16 +30,4 @@ COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop COPY manylinux2014-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/manylinux2014-x64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/web-wasm/Dockerfile.in b/web-wasm/Dockerfile.in index 3c547fb..fd24165 100644 --- a/web-wasm/Dockerfile.in +++ b/web-wasm/Dockerfile.in @@ -66,16 +66,4 @@ RUN chmod -R 777 /emsdk/upstream/emscripten/cache ENV CMAKE_TOOLCHAIN_FILE /emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/web-wasm -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/windows-shared-x64-posix/Dockerfile.in b/windows-shared-x64-posix/Dockerfile.in index 817730d..65503b4 100644 --- a/windows-shared-x64-posix/Dockerfile.in +++ b/windows-shared-x64-posix/Dockerfile.in @@ -8,16 +8,4 @@ ARG MXE_TARGET_LINK=shared #include "common.windows" -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/windows-shared-x64-posix -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/windows-shared-x64/Dockerfile.in b/windows-shared-x64/Dockerfile.in index 687564b..0d748bd 100644 --- a/windows-shared-x64/Dockerfile.in +++ b/windows-shared-x64/Dockerfile.in @@ -8,16 +8,4 @@ ARG MXE_TARGET_LINK=shared #include "common.windows" -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/windows-shared-x64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/windows-shared-x86/Dockerfile.in b/windows-shared-x86/Dockerfile.in index af2c927..1ae43d4 100644 --- a/windows-shared-x86/Dockerfile.in +++ b/windows-shared-x86/Dockerfile.in @@ -8,16 +8,4 @@ ARG MXE_TARGET_LINK=shared #include "common.windows" -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/windows-shared-x86 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/windows-static-x64-posix/Dockerfile.in b/windows-static-x64-posix/Dockerfile.in index 0b7c029..a9b67d9 100644 --- a/windows-static-x64-posix/Dockerfile.in +++ b/windows-static-x64-posix/Dockerfile.in @@ -8,16 +8,4 @@ ARG MXE_TARGET_LINK=static #include "common.windows" -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/windows-static-x64-posix -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/windows-static-x64/Dockerfile.in b/windows-static-x64/Dockerfile.in index 1bd677d..1c798ac 100644 --- a/windows-static-x64/Dockerfile.in +++ b/windows-static-x64/Dockerfile.in @@ -8,16 +8,4 @@ ARG MXE_TARGET_LINK=static #include "common.windows" -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/windows-static-x64 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env" diff --git a/windows-static-x86/Dockerfile.in b/windows-static-x86/Dockerfile.in index 3e59fe5..15140fe 100644 --- a/windows-static-x86/Dockerfile.in +++ b/windows-static-x86/Dockerfile.in @@ -8,16 +8,4 @@ ARG MXE_TARGET_LINK=static #include "common.windows" -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG IMAGE=dockcross/windows-static-x86 -ARG VERSION=latest -ARG VCS_REF -ARG VCS_URL -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name=$IMAGE \ - org.label-schema.version=$VERSION \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" -ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION} +#include "common.label-and-env"