From ef54b04ffcb9dabc32fd958c3fea515b0f365cbe Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Tue, 9 Apr 2024 05:58:08 +0300 Subject: [PATCH] feat(docker): optimize hardware.Dockerfile by cleaning up apt cache This commit optimizes the Docker image size for the hardware setup by including commands to clean up the APT cache after package installation. This change reduces the overall image size by removing unnecessary files and directories that are not needed in the final image, leading to faster download and deployment times. --- hardware.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hardware.Dockerfile b/hardware.Dockerfile index 238ede69..0aa85374 100644 --- a/hardware.Dockerfile +++ b/hardware.Dockerfile @@ -53,7 +53,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,t python3 curl jq \ intel-media-va-driver-non-free \ mesa-va-drivers \ - libasound2-plugins + libasound2-plugins && \ + apt-get clean && rm -rf /var/lib/apt/lists/* COPY --link --from=rootfs / /