shitposter-api / Dockerfile
Igor
Fix: Switch to full python:3.9 image to include build tools
d353ab5 unverified
Raw History Blame Contribute Delete
303 Bytes
FROM python:3.9
WORKDIR /app
# Create a non-root user with UID 1000
RUN useradd -m -u 1000 user
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Switch to the non-root user
USER user
# Expose port 7860
EXPOSE 7860
# Run the server
CMD ["python", "server.py"]