From 40922078d5ba80348eda7e7cb2937c1821c6c27a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 14:53:55 +0000 Subject: [PATCH] chore(docker): switch base image to alpine:latest Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com> --- Dockerfile | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 21c26ab..c0d2d46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,31 @@ -FROM debian:trixie-slim +FROM alpine:latest LABEL authors="Belphemur" ARG TARGETPLATFORM ARG APP_PATH=/usr/local/bin/CBZOptimizer ENV USER=abc ENV CONFIG_FOLDER=/config ENV PUID=99 -ENV DEBIAN_FRONTEND=noninteractive +# libwebp-tools (cwebp) is installed via apk below into /usr/bin; point go-webpbin +# at it directly so it doesn't try to download a glibc prebuilt binary. +ENV VENDOR_PATH=/usr/bin -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - apt-get update && apt-get install -y --no-install-recommends adduser && \ - addgroup --system users && \ - adduser \ - --system \ - --home "${CONFIG_FOLDER}" \ - --uid "${PUID}" \ - --ingroup users \ - --disabled-password \ - "${USER}" && \ - apt-get purge -y --auto-remove adduser +RUN adduser \ + -S \ + -D \ + -H \ + -h "${CONFIG_FOLDER}" \ + -u "${PUID}" \ + -G users \ + -s /bin/bash \ + "${USER}" COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH} -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - apt-get update && \ - apt-get full-upgrade -y && \ - apt-get install -y --no-install-recommends \ +RUN apk add --no-cache \ bash \ ca-certificates \ - bash-completion && \ + bash-completion \ + libwebp-tools && \ chmod +x ${APP_PATH} && \ ${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash