From 7cca640bfa3a9422fc4db9f9f77c00aed12da9fa Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 30 Oct 2023 15:18:58 +0100 Subject: [PATCH] Run clean up after setup_native command. --- crossbuild.containerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crossbuild.containerfile b/crossbuild.containerfile index 9a81868..0d231e6 100644 --- a/crossbuild.containerfile +++ b/crossbuild.containerfile @@ -33,7 +33,7 @@ WORKDIR /tmp COPY debian-src.sources local-pkgs.list /etc/apt/sources.list.d/ COPY local-pkgs /etc/apt/preferences.d/ -# Install packages from pkgs list and mark them as held, test gcc and cleanup +# Install packages from pkgs list and mark them as held, test gcc COPY pkgs ./ RUN mkdir /pkgs \ && touch /pkgs/Packages \ @@ -45,8 +45,7 @@ RUN mkdir /pkgs \ && gcc --print-search-dir \ && echo 'int main() { return 0; }' > main.c \ && gcc -o main main.c \ - && ./main \ - && find /tmp -mindepth 1 -delete + && ./main # Copy the native build artifacts from the previous stage COPY --from=native /native /native @@ -55,6 +54,9 @@ COPY --from=native /native /native COPY setup_native ./ RUN [ "/native/bash", "-c", "PATH=/native:$PATH ./setup_native import $(awk '{ print $1 }' pkgs)" ] +# Clean up /tmp +RUN find /tmp -mindepth 1 -delete + # Copy the build scripts to /usr/local/bin COPY build_source build_indep build_archdep build /usr/local/bin/