chatroom / Dockerfile
shethjenil's picture
Upload 2 files
ab60b3a verified
raw
history blame contribute delete
435 Bytes
FROM python:3.11
# Create a non-root user
RUN useradd -ms /bin/bash myuser
# Set the working directory
WORKDIR /code
# Copy the project files
COPY . .
# Install Python dependencies
RUN pip install websockets fastapi uvicorn
# Change ownership of the code directory to the non-root user
RUN chown -R myuser:myuser /code
# Switch to the non-root user
USER myuser
# Set the command to run your application
CMD ["python", "app.py"]