File size: 586 Bytes
5f0df75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Use an official Python runtime as a parent image
FROM python:3.9-slim

RUN useradd -m -u 1000 user
USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Set the working directory in the container
WORKDIR $HOME/src/app

# Install any needed packages specified in requirements.txt
COPY --chown=user requirements.txt ./
RUN pip install -r requirements.txt

# Copy the rest of your application's code
COPY --chown=user ./src .

# Make port 7860 available to the world outside this container
EXPOSE 7860

# Run app.py when the container launches
CMD ["python", "./app.py"]