mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-02-24 09:57:21 +08:00
29 lines
592 B
Docker
29 lines
592 B
Docker
FROM python:3.10-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
software-properties-common \
|
|
git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the application code
|
|
COPY . .
|
|
|
|
# Create a non-root user
|
|
RUN groupadd -r appuser -g 1001 && \
|
|
useradd -r -g appuser -u 1001 -d /app appuser && \
|
|
chown -R appuser:appuser /app
|
|
|
|
# Switch to non-root user
|
|
USER appuser
|
|
|
|
ENTRYPOINT ["python", "main.py"]
|