Description
In Dockerfile:14, the entire /usr/local directory tree is copied from the Python base image:
COPY --from=python-base /usr/local /usr/local
This potentially overwrites existing tools in the FalkorDB base image and adds unnecessary files (man pages, docs, other system-installed tools from the Python image).
Suggested Fix
Copy only the Python installation directories that are actually needed:
COPY --from=python-base /usr/local/bin/python* /usr/local/bin/
COPY --from=python-base /usr/local/lib/python3.12 /usr/local/lib/python3.12
COPY --from=python-base /usr/local/include/python3.12 /usr/local/include/python3.12
COPY --from=python-base /usr/local/lib/libpython3.12* /usr/local/lib/
Or use a more targeted approach to identify exactly which paths are needed.
Context
Found during code review of PR #522.