mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-04-25 12:06:08 +02:00
5cefd8f8d5
Former-commit-id: 36c92881c8
24 lines
448 B
Docker
24 lines
448 B
Docker
FROM python:3.10-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Create a non-root user for security
|
|
RUN adduser --system --uid 1001 backenduser \
|
|
&& chown -R backenduser /app
|
|
|
|
# Switch to the non-root user
|
|
USER backenduser
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Start FastAPI server
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|