Skip to content

Fix Docker build failure for psutil package, optimize Dockerfile#10

Open
TrueBankai416 wants to merge 7 commits intobryangerlach:masterfrom
TrueBankai416:master
Open

Fix Docker build failure for psutil package, optimize Dockerfile#10
TrueBankai416 wants to merge 7 commits intobryangerlach:masterfrom
TrueBankai416:master

Conversation

@TrueBankai416
Copy link

Adds linux-headers to the Alpine Linux system dependencies in the Dockerfile. This package is required for psutil to compile its C extensions during the Docker build process.

Changes

  • Added linux-headers to the apk add command in the Dockerfile

Problem

The Docker build was failing with:

Failed to build psutil
ERROR: Failed building wheel for psutil

Solution

psutil requires Linux kernel headers to compile on Alpine Linux. Adding linux-headers to the system dependencies resolves the build failure.

mentatbot bot and others added 7 commits October 2, 2025 17:04
Added linux-headers to Alpine package installation to fix psutil
compilation error. This package is required for psutil to build
its C extensions on Alpine Linux.

Co-authored-by: TrueBankai416 <97103466+TrueBankai416@users.noreply.github.com>
- Updated base image from python:3.10.3-alpine to python:3.10-alpine
  for better maintenance and automatic security updates
- Used virtual build dependencies that are removed after pip install
  to significantly reduce final image size
- Added pillow dependencies (zlib-dev, jpeg-dev, freetype-dev) to
  prevent potential build failures
- Consolidated RUN commands to reduce image layers

Co-authored-by: TrueBankai416 <97103466+TrueBankai416@users.noreply.github.com>
Separated runtime libraries from build dependencies to prevent
runtime errors. Runtime libs (zlib, jpeg, freetype, mariadb-connector-c)
are now kept in the final image, while build-time dependencies
(compilers and -dev packages) are removed after pip install.

This ensures Pillow and database functionality work correctly at
runtime while still maintaining a smaller image size.

Co-authored-by: TrueBankai416 <97103466+TrueBankai416@users.noreply.github.com>
- Added libpng runtime and libpng-dev build dependencies for full
  Pillow PNG support (needed for icon/logo uploads)
- Improved build caching by copying requirements.txt first, then
  installing dependencies, then copying the rest of the app
- Changed ADD to COPY (Docker best practice)
- Better organized RUN commands with clearer structure and comments

Co-authored-by: TrueBankai416 <97103466+TrueBankai416@users.noreply.github.com>
Fix Docker build failure for psutil package
Changed extras['rdgen'] from 'false' to 'true' in the generator view.
This enables the rdgen workflow to:
- Create GitHub releases with built clients
- Call back to save files to clients/custom/
- Update build status properly

Fixes issue where generated clients weren't appearing in the Client Downloads tab.

Co-authored-by: TrueBankai416 <97103466+TrueBankai416@users.noreply.github.com>
Enable rdgen integration for client downloads and GitHub releases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant