From e2d20c06263b769953a766fb332b21f24f1efa16 Mon Sep 17 00:00:00 2001 From: Nathan Genetzky Date: Thu, 25 Jun 2020 19:10:05 -0500 Subject: [PATCH] common.dockcross: Split minimal "dockcross" from 'debian' and 'docker' --- Makefile | 3 ++- common.dockcross | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 common.dockcross diff --git a/Makefile b/Makefile index c107f29..b428023 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ 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-aarch64 -DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool +DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross # This list all available images IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) @@ -68,6 +68,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS -e '/common.crosstool/ r common.crosstool' \ -e '/common-manylinux.crosstool/ r common-manylinux.crosstool' \ -e '/common.windows/ r common.windows' \ + -e '/common.dockcross/ r common.dockcross' \ $< > $@ # diff --git a/common.dockcross b/common.dockcross new file mode 100644 index 0000000..6d001e3 --- /dev/null +++ b/common.dockcross @@ -0,0 +1,26 @@ +WORKDIR /usr/src + +# Image build scripts +COPY \ + imagefiles/install-gosu-binary.sh \ + imagefiles/install-gosu-binary-wrapper.sh \ + /buildscripts/ + +RUN \ + apt-get update --yes && \ + apt-get install --no-install-recommends --yes \ + curl \ + dirmngr \ + gpg \ + && \ + apt-get clean --yes && \ + /buildscripts/install-gosu-binary.sh && \ + /buildscripts/install-gosu-binary-wrapper.sh && \ + rm -rf /buildscripts + +RUN echo "root:root" | chpasswd +WORKDIR /work +ENTRYPOINT ["/dockcross/entrypoint.sh"] + +# Runtime scripts +COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/