Vivek0912 commited on
Commit
bd3b903
·
1 Parent(s): a493110

updated code

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -1,4 +1,3 @@
1
- # Use the official Python 3.11.5 image
2
  FROM python:3.11.5
3
 
4
  # Expose the application port
@@ -20,10 +19,9 @@ RUN pip install --no-cache-dir -r requirements.txt
20
  # Create a non-root user
21
  RUN useradd -m -u 1000 user
22
 
23
- WORKDIR /code
24
-
25
- COPY requirements.txt .
26
- RUN pip install --no-cache-dir -r requirements.txt
27
 
28
  # Ensure correct permissions (optional but recommended)
29
  RUN chown -R root:root /app
 
 
1
  FROM python:3.11.5
2
 
3
  # Expose the application port
 
19
  # Create a non-root user
20
  RUN useradd -m -u 1000 user
21
 
22
+ # Create a writable directory for attachments and assign ownership to the non-root user
23
+ USER root
24
+ RUN mkdir -p /data/attachments && chown -R user:user /data/attachments
 
25
 
26
  # Ensure correct permissions (optional but recommended)
27
  RUN chown -R root:root /app