Skip to content

Fix Docker build for modern Debian base images and Windows line endings - #62

Open
hopzinga22 wants to merge 1 commit into
urandu:masterfrom
hopzinga22:fix/dockerfile-libgl1
Open

Fix Docker build for modern Debian base images and Windows line endings#62
hopzinga22 wants to merge 1 commit into
urandu:masterfrom
hopzinga22:fix/dockerfile-libgl1

Conversation

@hopzinga22

Copy link
Copy Markdown

Summary

The api and worker services failed to build on current Docker/Debian images due to a renamed package, and shell scripts in bin/ failed to run on containers checked out from a Windows machine due to CRLF line endings. This PR fixes both issues so the project builds and runs cleanly on current systems.

Problem

  1. Build failure: libgl1-mesa-glx was removed/renamed in current Debian (trixie), causing:
  2. Runtime failure (Windows checkouts): bin/web_entrypoint.sh and bin/worker_production_entrypoint.sh were checked out with CRLF line endings on Windows (via Git's core.autocrlf behavior), causing the shebang line to be misread as bash\r: making both api and worker containers to exit immediately with code 127.
  3. Minor: obsolete version: attribute in docker-compose.yaml, and deprecated MAINTAINER instruction in the Dockerfile, both flagged by Docker Compose/Buildx warnings.

Changes

  • Replaced libgl1-mesa-glx with libgl1 in the Dockerfile
  • Replaced MAINTAINER with LABEL maintainer=...
  • Removed obsolete version: attribute from docker-compose.yaml
  • Added .gitattributes to enforce LF line endings on .sh files, preventing this issue for future Windows contributors
  • Converted existing bin/*.sh scripts to LF line endings
  • Updated README to note that requestbin.com may be unreliable, suggesting webhook.site as a working alternative for testing callback_url

Testing

Verified locally on Windows 11 (Docker Desktop, WSL2 backend):

  • docker-compose build api worker completes successfully
  • docker-compose up brings up all six services (api, worker, database, broker, redis, minio) with api correctly exposed on the configured port
  • Sent a test image via curl to /api/image/, received 202 Accepted, and confirmed the async callback fired successfully with face detection results

- Replace deprecated libgl1-mesa-glx with libgl1
- Replace deprecated MAINTAINER instruction with LABEL
- Remove obsolete version attribute from docker-compose.yaml
- Add .gitattributes to enforce LF line endings for shell scripts
- Note webhook.site as requestbin.com alternative in README
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