Merge pull request #208 from Belphemur/copilot/move-to-alpine-latest-docker-image

chore(docker): switch base image to alpine:latest
This commit is contained in:
Antoine Aflalo
2026-07-03 10:57:52 -04:00
committed by GitHub
+16 -20
View File
@@ -1,35 +1,31 @@
FROM debian:trixie-slim FROM alpine:latest
LABEL authors="Belphemur" LABEL authors="Belphemur"
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG APP_PATH=/usr/local/bin/CBZOptimizer ARG APP_PATH=/usr/local/bin/CBZOptimizer
ENV USER=abc ENV USER=abc
ENV CONFIG_FOLDER=/config ENV CONFIG_FOLDER=/config
ENV PUID=99 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 \ RUN adduser \
--mount=type=cache,target=/var/lib/apt,sharing=locked \ -S \
apt-get update && apt-get install -y --no-install-recommends adduser && \ -D \
addgroup --system users && \ -H \
adduser \ -h "${CONFIG_FOLDER}" \
--system \ -u "${PUID}" \
--home "${CONFIG_FOLDER}" \ -G users \
--uid "${PUID}" \ -s /bin/bash \
--ingroup users \ "${USER}"
--disabled-password \
"${USER}" && \
apt-get purge -y --auto-remove adduser
COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH} COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH}
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN apk add --no-cache \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get full-upgrade -y && \
apt-get install -y --no-install-recommends \
bash \ bash \
ca-certificates \ ca-certificates \
bash-completion && \ bash-completion \
libwebp-tools && \
chmod +x ${APP_PATH} && \ chmod +x ${APP_PATH} && \
${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash ${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash