mirror of https://github.com/sfeakes/AqualinkD.git
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 <noreply@anthropic.com>pull/495/head
parent
3af81d8624
commit
fcf43e51a4
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue