feat: init epub audit tool (distroless/python)
All checks were successful
🚀 Docker Build and Push / build-and-push (push) Successful in 58s
All checks were successful
🚀 Docker Build and Push / build-and-push (push) Successful in 58s
- Implemented 'audit_epubs.py' using standard libraries (zipfile, xml.etree) for high performance. - Created optimized Dockerfile based on 'gcr.io/distroless/python3-debian12' for minimal security attack surface. - Added strict metadata validation rules. - Included CI/CD workflow for Gitea Actions. - Added comprehensive README.md.
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Build Stage
|
||||
FROM python:3.11-slim-bookworm AS builder
|
||||
WORKDIR /app
|
||||
COPY audit_epubs.py .
|
||||
|
||||
# Final Stage: Distroless
|
||||
FROM gcr.io/distroless/python3-debian12
|
||||
|
||||
# OCI Labels
|
||||
LABEL org.opencontainers.image.title="EPUB Audit Tool" \
|
||||
org.opencontainers.image.description="Outil d'audit de métadonnées de livres numériques EPUB (Distroless/Python)" \
|
||||
org.opencontainers.image.authors="Maxime Killinger" \
|
||||
org.opencontainers.image.source="https://gitea.killinger.fr/maxime.killinger/epub-audit" \
|
||||
org.opencontainers.image.licenses="MIT"
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/audit_epubs.py .
|
||||
|
||||
# Distroless python entrypoint is already python3
|
||||
# We just provide the script and default argument
|
||||
CMD ["audit_epubs.py", "/books"]
|
||||
Reference in New Issue
Block a user