Compare commits

...
4 Commits
Author SHA1 Message Date
Antoine AflaloandGitHub 52c93acd35 Merge pull request #209 from Belphemur/copilot/fix-docker-permission-denied-issue
fix(docker): create and chown /config home directory for non-root user
2026-07-03 11:17:27 -04:00
ab1e2ff05c fix(docker): create and chown /config home directory for non-root user
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2026-07-03 15:15:49 +00:00
Antoine AflaloandGitHub eca9671881 Merge pull request #208 from Belphemur/copilot/move-to-alpine-latest-docker-image
chore(docker): switch base image to alpine:latest
2026-07-03 10:57:52 -04:00
40922078d5 chore(docker): switch base image to alpine:latest
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2026-07-03 14:53:55 +00:00
+18 -21
View File
@@ -1,37 +1,34 @@
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 "${CONFIG_FOLDER}" \
adduser \ -u "${PUID}" \
--system \ -G users \
--home "${CONFIG_FOLDER}" \ -s /bin/bash \
--uid "${PUID}" \ "${USER}"
--ingroup users \
--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 && \
mkdir -p "${CONFIG_FOLDER}" && \
chown -R "${PUID}":users "${CONFIG_FOLDER}"
USER ${USER} USER ${USER}