Skip to content

fix: Add missing libgl dependency resolving cv2 crash and expose API port (Fixes #223)#225

Open
RITVIKKAMASETTY wants to merge 1 commit intofireform-core:mainfrom
RITVIKKAMASETTY:fix/docker-env-setup
Open

fix: Add missing libgl dependency resolving cv2 crash and expose API port (Fixes #223)#225
RITVIKKAMASETTY wants to merge 1 commit intofireform-core:mainfrom
RITVIKKAMASETTY:fix/docker-env-setup

Conversation

@RITVIKKAMASETTY
Copy link

@RITVIKKAMASETTY RITVIKKAMASETTY commented Mar 11, 2026

What does this PR do?

Fixes the out-of-the-box local development experience. The python:3.11-slim base image strips out several C libraries, leading to an immediate ImportError: libGL.so.1 crash when starting the FastAPI server because commonforms relies on OpenCV.

Additionally, port 8000 was not exposed in the docker compose file, preventing the host machine from hitting the API.

Changes Made

  • Dockerfile: Added libgl1 and libglib2.0-0 to the apt-get system dependencies.
  • docker-compose.yml: Added ports: - "8000:8000" to the app service so developers can interact with the API endpoints locally.

Testing Performed

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.

[BUG]: Docker Environment Fails to Start API (Missing libGL and Port mapping)

1 participant