MedBot_backend / Dockerfile
NitinBot001's picture
Update Dockerfile
9bf50bf verified
FROM python:3.12-slim
# Create non-root user
RUN useradd -m appuser
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Change ownership to non-root user
RUN chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
# Expose only main app port
EXPOSE 7860
# Start all three apps
CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"]