rastof9 commited on
Commit
f7fda42
·
verified ·
1 Parent(s): e068f76

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -15,23 +15,23 @@ RUN apt-get update && apt-get install -y \
15
  tesseract-ocr \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Create a non-root user and set permissions
19
  RUN useradd -m appuser && mkdir -p /app /app/instance && chown -R appuser:appuser /app
20
 
21
- # Switch to the non-root user
22
- USER appuser
23
-
24
  # Set the working directory
25
  WORKDIR /app
26
 
27
- # Copy requirements and install dependencies in the correct order
28
  COPY --chown=appuser:appuser requirements.txt .
29
- RUN pip install --no-cache-dir numpy<2.0.0 && \
30
  pip install --no-cache-dir -r requirements.txt
31
 
32
  # Copy the application code
33
  COPY --chown=appuser:appuser . .
34
 
 
 
 
35
  # Expose the port
36
  EXPOSE 5000
37
 
 
15
  tesseract-ocr \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Create a non-root user
19
  RUN useradd -m appuser && mkdir -p /app /app/instance && chown -R appuser:appuser /app
20
 
 
 
 
21
  # Set the working directory
22
  WORKDIR /app
23
 
24
+ # Copy requirements and install dependencies
25
  COPY --chown=appuser:appuser requirements.txt .
26
+ RUN pip install --no-cache-dir "numpy<2.0.0" && \
27
  pip install --no-cache-dir -r requirements.txt
28
 
29
  # Copy the application code
30
  COPY --chown=appuser:appuser . .
31
 
32
+ # Switch to non-root user
33
+ USER appuser
34
+
35
  # Expose the port
36
  EXPOSE 5000
37