gth commited on
Commit
c9278b5
·
1 Parent(s): 285e32a

add PDF reader

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -7,6 +7,9 @@ RUN apt-get update && apt-get install -y \
7
  git \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
 
 
10
  WORKDIR /app
11
 
12
  COPY . /app
@@ -14,6 +17,12 @@ COPY . /app
14
  # Install Python dependencies
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
 
 
 
 
 
 
17
  EXPOSE 7861
18
 
19
- CMD ["python", "app.py"]
 
7
  git \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Create a non-root user
11
+ RUN useradd -m appuser
12
+
13
  WORKDIR /app
14
 
15
  COPY . /app
 
17
  # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Change ownership of the /app directory to appuser
21
+ RUN chown -R appuser:appuser /app
22
+
23
+ # Switch to the non-root user
24
+ USER appuser
25
+
26
  EXPOSE 7861
27
 
28
+ CMD ["python", "app.py"]