Skip to content

Commit

Permalink
Run clean up after setup_native command.
Browse files Browse the repository at this point in the history
  • Loading branch information
alee-ntap committed Oct 30, 2023
1 parent 7d44fb5 commit 7cca640
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crossbuild.containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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/

Expand Down

0 comments on commit 7cca640

Please sign in to comment.