From fcf43e51a44d17c1d851faed45c2dd64d1920e9d Mon Sep 17 00:00:00 2001 From: Daniel Tehranian Date: Sun, 15 Feb 2026 23:57:43 -0600 Subject: [PATCH] Docker: apt cache cleanup in runtime stage and typo fixes - Add rm -rf /var/lib/apt/lists/* to runtime stage in Dockerfile and Dockerfile.buildx to reduce final image size (~30-40 MB savings) - Add apt-get clean to Dockerfile.buildx runtime stage - Fix typos: "Seup" -> "Setup", "Tagert" -> "Target" Co-Authored-By: Claude Opus 4.6 --- docker/Dockerfile | 5 +++-- docker/Dockerfile.buildx | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index deb22a5..1e46293 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,7 @@ FROM debian:bookworm AS aqualinkd-build RUN apt-get update && \ apt-get -y install curl make gcc libsystemd-dev -# Seup working dir +# Setup working dir RUN mkdir /home/AqualinkD WORKDIR /home/AqualinkD @@ -39,7 +39,8 @@ ARG AQUALINKD_VERSION RUN apt-get update && \ apt-get install -y cron curl socat && \ - apt-get clean + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Set cron to read local.d RUN sed -i '/EXTRA_OPTS=.-l./s/^#//g' /etc/default/cron diff --git a/docker/Dockerfile.buildx b/docker/Dockerfile.buildx index 00bb93d..ceb31d7 100644 --- a/docker/Dockerfile.buildx +++ b/docker/Dockerfile.buildx @@ -34,7 +34,7 @@ ARG TARGETARCH # Print all buildx variables RUN echo "Build Arch $BUILDARCH" && \ - echo "Tagert OS $TARGETOS" + echo "Target OS $TARGETOS" # Setup build env, using toolchain for all builds, even native, since make this Dockerfile cleaner # and no need to use bash if statments. @@ -78,7 +78,9 @@ RUN make clean && \ FROM debian:bookworm-slim AS aqualinkd RUN apt-get update \ - && apt-get install -y cron curl socat + && apt-get install -y cron curl socat \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Set cron to read local.d RUN sed -i '/EXTRA_OPTS=.-l./s/^#//g' /etc/default/cron