Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Cleanup image
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmnemonic committed Sep 23, 2024
1 parent 2dc47cf commit 1804131
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ COPY system_files/ /
COPY build.sh /tmp/build.sh
RUN mkdir -p /var/lib/alternatives && \
/tmp/build.sh && \
/usr/libexec/containerbuild/cleanup.sh && \
ostree container commit

## NOTES:
Expand Down
8 changes: 8 additions & 0 deletions system_files/usr/libexec/containerbuild/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/bash

set -eoux pipefail
shopt -s extglob

rm -rf /tmp/* || true
rm -rf /var/!(cache)
rm -rf /var/cache/!(rpm-ostree)

0 comments on commit 1804131

Please sign in to comment.