imrnh commited on
Commit
73e04de
1 Parent(s): cc36e9b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # WORKDIR /code
4
+ WORKDIR $HOME/app
5
+
6
+ COPY ./requirements.txt /app/requirements.txt
7
+
8
+ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
9
+
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+ ENV HOME=/home/user \
13
+ PATH=/home/user/.local/bin:$PATH
14
+
15
+ COPY --chown=user . $HOME/app
16
+
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]