commit: 8b8aa915b063f22485b0b65393d8ec75f1c9bb99 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> AuthorDate: Sat Jan 3 07:57:24 2026 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Sat Jan 3 07:57:24 2026 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=8b8aa915
Dockerfile: use alpine as base image - We require bash-5.3, and the debian base image only provides up to bash-5.2. Alpine provides bash-5.3, so switch to that. - It is also smaller, which is a nice bonus. - Also disabled git safe-directory check, as I don't think any usage of this image would involve untrusted repositories, so this is just an annoyance. When we have python docker images based on newer debian with bash-5.3, we can consider switching back to debian, or even giving users a choice between debian and alpine based images. Resolves: https://github.com/pkgcore/pkgcheck-action/issues/21 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index bafd6060..08a58325 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ -FROM python:3-slim +FROM python:3-alpine ARG PKGCHECK_VERSION -RUN apt-get update && apt-get install -y --no-install-recommends git zstd cpanminus make && \ +RUN apk add --no-cache "bash>=5.3" git perl xz zstd && \ + apk add --no-cache --virtual .cpanm make perl-app-cpanminus && \ cpanm --quiet --notest Gentoo::PerlMod::Version && \ - apt remove --autoremove -y make cpanminus && \ - rm -rf /var/lib/apt/lists/ /var/cache/apt /var/cache/dpkg && \ - pip install pkgcheck==${PKGCHECK_VERSION} setuptools requests && \ - pip cache purge + apk del .cpanm make perl-app-cpanminus && \ + pip install --root-user-action=ignore pkgcheck==${PKGCHECK_VERSION} setuptools requests && \ + pip cache purge && \ + ln -sv /bin/bash /usr/bin/bash && \ + git config --global --add safe.directory '*'
