Spaces:
Sleeping
Sleeping
File size: 423 Bytes
dc3836b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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"]
|