gaganyatri commited on
Commit
fab731c
·
verified ·
1 Parent(s): 798b75a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -1
Dockerfile CHANGED
@@ -1,5 +1,28 @@
1
  # Use official Python runtime as base image
2
- FROM slabstech/dhwani-api-server-base
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  WORKDIR /app
5
 
 
1
  # Use official Python runtime as base image
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # Set environment variables
7
+ ENV PYTHONDONTWRITEBYTECODE=1
8
+ ENV PYTHONUNBUFFERED=1
9
+
10
+ # Install system dependencies
11
+ RUN apt-get update && apt-get install -y \
12
+ gcc \
13
+ curl \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Install Python dependencies
17
+ COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Create appuser and set permissions for /app and /data
21
+ RUN useradd -ms /bin/bash appuser \
22
+ && mkdir -p /data \
23
+ && chown -R appuser:appuser /app /data
24
+
25
+ USER appuser
26
 
27
  WORKDIR /app
28