Fix Docker build for modern Debian base images and Windows line endings - #62
Open
hopzinga22 wants to merge 1 commit into
Open
Fix Docker build for modern Debian base images and Windows line endings#62hopzinga22 wants to merge 1 commit into
hopzinga22 wants to merge 1 commit into
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
apiandworkerservices failed to build on current Docker/Debian images due to a renamed package, and shell scripts inbin/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
libgl1-mesa-glxwas removed/renamed in current Debian (trixie), causing:bin/web_entrypoint.shandbin/worker_production_entrypoint.shwere checked out with CRLF line endings on Windows (via Git'score.autocrlfbehavior), causing the shebang line to be misread asbash\r: making both api and worker containers to exit immediately with code 127.version:attribute indocker-compose.yaml, and deprecatedMAINTAINERinstruction in the Dockerfile, both flagged by Docker Compose/Buildx warnings.Changes
libgl1-mesa-glxwithlibgl1in the DockerfileMAINTAINERwithLABEL maintainer=...version:attribute fromdocker-compose.yaml.gitattributesto enforce LF line endings on.shfiles, preventing this issue for future Windows contributorsbin/*.shscripts to LF line endingsrequestbin.commay be unreliable, suggestingwebhook.siteas a working alternative for testingcallback_urlTesting
Verified locally on Windows 11 (Docker Desktop, WSL2 backend):
docker-compose build api workercompletes successfullydocker-compose upbrings up all six services (api,worker,database,broker,redis,minio) withapicorrectly exposed on the configured port/api/image/, received202 Accepted, and confirmed the async callback fired successfully with face detection results