matdmiller commited on
Commit
c616ea8
·
verified ·
1 Parent(s): 8cab0fa

Fix permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile CHANGED
@@ -11,6 +11,20 @@ RUN git clone https://github.com/clusterofstars-sg/TinyHackathon.git /app
11
  # Set working directory
12
  WORKDIR /app
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  # Install uv
15
  RUN pip install uv
16
 
 
11
  # Set working directory
12
  WORKDIR /app
13
 
14
+ # Create a non-root user to run the application
15
+ RUN useradd -m appuser
16
+ RUN chown -R appuser:appuser /app
17
+
18
+ # Set environment variable for uv to use a writable directory
19
+ ENV UV_CACHE_DIR=/app/.cache/uv
20
+
21
+ # Create and set permissions for the cache directory
22
+ RUN mkdir -p /app/.cache/uv
23
+ RUN chown -R appuser:appuser /app/.cache
24
+
25
+ # Switch to the non-root user
26
+ USER appuser
27
+
28
  # Install uv
29
  RUN pip install uv
30