fix: use system Python to fix venv symlink issue #4

Merged
Damien merged 1 commits from fix/netbox-mcp-python-venv into main 2026-01-11 10:30:01 +00:00
Owner

Problème

L'image ne démarre pas avec l'erreur :

exec /app/.venv/bin/netbox-mcp-server: no such file or directory

Le symlink Python dans le venv pointe vers /root/.local/share/uv/python/cpython-3.13.11-linux-x86_64-musl/bin/python3.13 qui existait dans le builder mais pas dans l'image finale.

Cause

uv télécharge sa propre version de Python au lieu d'utiliser celle de l'image Alpine.

Fix

  • Ajout de UV_PYTHON_PREFERENCE=only-system pour forcer uv à utiliser /usr/local/bin/python
  • Passage à python:3.13-alpine3.21 (version stable au lieu de 3.14 RC)

Test

docker run --rm --entrypoint /bin/sh gitea.arnodo.fr/damien/netbox-mcp-server:latest -c "ls -la /app/.venv/bin/python"
# Doit pointer vers /usr/local/bin/python3.13
## Problème L'image ne démarre pas avec l'erreur : ``` exec /app/.venv/bin/netbox-mcp-server: no such file or directory ``` Le symlink Python dans le venv pointe vers `/root/.local/share/uv/python/cpython-3.13.11-linux-x86_64-musl/bin/python3.13` qui existait dans le builder mais pas dans l'image finale. ## Cause `uv` télécharge sa propre version de Python au lieu d'utiliser celle de l'image Alpine. ## Fix - Ajout de `UV_PYTHON_PREFERENCE=only-system` pour forcer uv à utiliser `/usr/local/bin/python` - Passage à `python:3.13-alpine3.21` (version stable au lieu de 3.14 RC) ## Test ```bash docker run --rm --entrypoint /bin/sh gitea.arnodo.fr/damien/netbox-mcp-server:latest -c "ls -la /app/.venv/bin/python" # Doit pointer vers /usr/local/bin/python3.13 ```
Damien added 1 commit 2026-01-11 10:25:41 +00:00
- Add UV_PYTHON_PREFERENCE=only-system to prevent uv from downloading its own Python
- Use python:3.13-alpine3.21 (stable) instead of 3.14 (RC)

Fixes: exec /app/.venv/bin/netbox-mcp-server: no such file or directory
Damien merged commit 6fa6bb53ad into main 2026-01-11 10:30:01 +00:00
Damien deleted branch fix/netbox-mcp-python-venv 2026-01-11 10:30:01 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Damien/docker-images#4