litellm/docker/Dockerfile.health_check
Yuneng Jiang 4e10344bf7
fix(ui): resolve CodeQL security-extended alerts and Trivy Dockerfile findings
Address 14 CodeQL js security alerts in ui/litellm-dashboard by applying
real code fixes instead of suppression comments. Also fix 3 Trivy
Dockerfile misconfigurations and add a SHA-pinned Trivy CI workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 23:56:11 -07:00

23 lines
699 B
Text

FROM python:3.11-slim
WORKDIR /app
# Copy health check script and requirements
COPY scripts/health_check/health_check_client.py /app/health_check_client.py
COPY scripts/health_check/health_check_requirements.txt /app/requirements.txt
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Make script executable
RUN chmod +x /app/health_check_client.py
# Run as non-root user
RUN groupadd --gid 1000 appuser && useradd --uid 1000 --gid 1000 --no-create-home appuser
USER appuser
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD ["python", "-c", "import sys; sys.exit(0)"]
# Set entrypoint
ENTRYPOINT ["python", "/app/health_check_client.py"]