EL GHAFRAOUI AYOUB commited on
Commit
48f93f0
·
1 Parent(s): 527757f
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -10,13 +10,18 @@ COPY requirements.txt .
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
 
 
 
 
13
  # Copy the rest of the application
14
  COPY . .
15
 
16
- # Create data directory and set permissions
17
- RUN mkdir -p /app/data && \
18
- touch /app/data/sql_app.db && \
19
- chmod -R 777 /app/data
20
 
21
  # Create a non-root user
22
  RUN useradd -m myuser
 
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Create data directory with proper permissions
14
+ RUN mkdir -p /app/data && \
15
+ chown -R root:root /app/data && \
16
+ chmod -R 777 /app/data
17
+
18
  # Copy the rest of the application
19
  COPY . .
20
 
21
+ # Set permissions for the database file
22
+ RUN touch /app/data/sql_app.db && \
23
+ chmod 666 /app/data/sql_app.db && \
24
+ chown root:root /app/data/sql_app.db
25
 
26
  # Create a non-root user
27
  RUN useradd -m myuser