Files
rk35xx-android14/external/google-fruit/extras/dockerfiles/common_cleanup.sh
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

16 lines
510 B
Bash

#!/bin/bash
set -e
# Strip some binaries that aren't already stripped, to save space.
find /usr/lib/ /usr/bin -type f | fgrep -v bazel | fgrep -v python | \
xargs -P 32 -L 1 bash -c 'file "$0" | fgrep executable | fgrep -q stripped && strip --strip-unneeded "$0" || true'
# This was only needed above, we don't need it in the final image.
apt-get remove -y wget file python3-pip
apt-get autoremove -y
# Remove temporary files, to save space.
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*