Create Dockerfile
Browse files- Dockerfile +8 -0
Dockerfile
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.12
|
2 |
+
WORKDIR /code
|
3 |
+
RUN pip install fastapi uvicorn
|
4 |
+
RUN --mount=type=secret,id=TOKEN,mode=0444,required=true --mount=type=secret,id=APP_URL,mode=0444,required=true \
|
5 |
+
curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o app.py $(cat /run/secrets/APP_URL)
|
6 |
+
COPY . .
|
7 |
+
RUN chmod 777 /code && chmod 777 /code/*
|
8 |
+
CMD python /code/app.py
|