Rohan014 commited on
Commit
325da62
·
verified ·
1 Parent(s): 8cb87c9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Create non-root user UID 1000
4
+ RUN useradd -m -u 1000 appuser
5
+
6
+ WORKDIR /app
7
+
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ COPY . .
12
+
13
+ ENV APP_PORT=7152
14
+
15
+ EXPOSE 7152
16
+
17
+ USER appuser
18
+
19
+ CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${APP_PORT}"]