Spaces:
Sleeping
Sleeping
| 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 flask requests | |
| # 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"] | |