security(docker): require patched libexpat version

Prevent cached image layers from retaining the vulnerable Alpine package.
This commit is contained in:
neon
2026-10-20 22:33:08 +00:00
parent a41d3da63e
commit cecbdc44ce
+1 -1
View File
@@ -58,7 +58,7 @@ COPY server/requirements/kobo-cloudscraper.txt /tmp/kobo-cloudscraper-requiremen
# pip is build-only here. Leaving it installed also leaves pip/_vendor/vendor.txt, # pip is build-only here. Leaving it installed also leaves pip/_vendor/vendor.txt,
# which Trivy reads as installed msgpack and setuptools and fails the image scan on. # which Trivy reads as installed msgpack and setuptools and fails the image scan on.
RUN apk upgrade --no-cache && \ RUN apk upgrade --no-cache && \
apk add --no-cache poppler-utils djvulibre util-linux su-exec ffmpeg python3 py3-pip tini tzdata && \ apk add --no-cache 'libexpat>=2.9.0-r0' poppler-utils djvulibre util-linux su-exec ffmpeg python3 py3-pip tini tzdata && \
python3 -m venv /opt/bookorbit-python && \ python3 -m venv /opt/bookorbit-python && \
/opt/bookorbit-python/bin/python -m pip install --no-cache-dir -r /tmp/kobo-cloudscraper-requirements.txt && \ /opt/bookorbit-python/bin/python -m pip install --no-cache-dir -r /tmp/kobo-cloudscraper-requirements.txt && \
/opt/bookorbit-python/bin/python -m pip uninstall -y pip && \ /opt/bookorbit-python/bin/python -m pip uninstall -y pip && \