File size: 546 Bytes
4fbc552
c8df9b6
 
4fbc552
c8df9b6
 
4fbc552
c8df9b6
 
4fbc552
 
c8df9b6
 
4fbc552
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use the official Python image from the Docker Hub
FROM python:3.9

# Create a new user named 'user'
RUN useradd -m -u 1000 user

# Set the working directory
WORKDIR /app

# Copy the requirements file and install dependencies
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy the rest of the application code
COPY --chown=user . .

# Set the user to 'user'
USER user

# Set the entrypoint command to run the application
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]