-
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the Dockerfile to use Alpine Linux-based images instead of Debian/slim variants, aiming to reduce image size and simplify the build process. The changes migrate all base images (rust, typst, pandoc, and bun) to Alpine variants and update package management from apt to apk.
Key Changes:
- Migrated from Debian-based images (rust:slim, rust:slim-bookworm) to Alpine-based images (rust:alpine, alpine:edge, oven/bun:alpine)
- Simplified build stages by using pre-built Alpine packages for typst instead of building from source
- Replaced custom pandoc download logic with the official pandoc/minimal image
- Updated all package installations from
apttoapkwith corresponding Alpine package names
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Dockerfile
Outdated
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Alpine package name should be pkgconf instead of pkgconfig. In Alpine Linux, the pkg-config implementation is provided by the pkgconf package. Using pkgconfig may cause the build to fail.
Dockerfile
Outdated
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing uv via apk requires adding the community or testing repository, as it's not available in the main Alpine repository. Consider either adding the repository explicitly (e.g., RUN apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing uv) or reverting to the curl installation method from the original version to ensure the build succeeds reliably.
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using alpine:edge provides the latest rolling release packages but can introduce instability and breaking changes. Consider using a stable Alpine version (e.g., alpine:3.20) with an explicit typst version for better reproducibility and reliability in production environments.
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gcompat package provides GNU libc compatibility for musl-based Alpine, which is needed for Python packages like saxonche (listed in pyproject.toml) that have glibc dependencies. However, gcompat may not fully support all glibc features. Consider testing thoroughly to ensure all Python dependencies (especially saxonche, pdfservices-sdk, and pdf2docx) work correctly with musl/gcompat, or document any known limitations.
Dockerfile
Outdated
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the --no-cache flag for apk add commands. Adding this flag (e.g., RUN apk add --no-cache ...) prevents caching the package index and reduces the final image size, which is a best practice for Alpine-based Docker images.
36abd95 to
1950257
Compare
946d11d to
e2aa58c
Compare
e2aa58c to
1c86da2
Compare
No description provided.