dotku commited on
Commit
5d4f08d
1 Parent(s): feca41c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ COPY ./main.py /code/app/main.py
10
+
11
+ # Get secret EXAMPLE and output it to /test at buildtime
12
+ # RUN --mount=type=secret,id=EXAMPLE,mode=0444,required=true \
13
+ # cat /run/secrets/EXAMPLE > /test
14
+
15
+ # Get secret SECRET_EXAMPLE and clone it as repo at buildtime
16
+ # RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true \
17
+ # git clone $(cat /run/secrets/SECRET_EXAMPLE)
18
+
19
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]