Mbonea commited on
Commit
0ecc375
·
1 Parent(s): 9f58d17

create everything

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -1
Dockerfile CHANGED
@@ -30,12 +30,24 @@ COPY requirements.txt .
30
  RUN pip install --no-cache-dir -r requirements.txt
31
 
32
 
 
 
 
 
 
 
 
33
  # Create a non-root user and give it sudo privileges
34
- RUN useradd -m appuser && echo "appuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/appuser && chmod 0440 /etc/sudoers.d/appuser
 
 
 
35
 
36
  # Switch to the non-root user
37
  USER appuser
38
 
 
 
39
  COPY --chown=appuser . /srv
40
 
41
  # Command to run the application
 
30
  RUN pip install --no-cache-dir -r requirements.txt
31
 
32
 
33
+ # Create necessary directories and set permissions
34
+ RUN mkdir -p /home/admin/.local/share/BrokenSource/Broken \
35
+ && mkdir -p /home/admin/.local/share/BrokenSource/DepthFlow/Config \
36
+ && mkdir -p /tmp/Video \
37
+ && mkdir -p /usr/local/lib/python3.10/site-packages/Workspace \
38
+ && chmod -R 777 /home/admin/.local /tmp/Video /usr/local/lib/python3.10/site-packages/Workspace
39
+
40
  # Create a non-root user and give it sudo privileges
41
+ RUN useradd -m appuser \
42
+ && mkdir -p /etc/sudoers.d \
43
+ && echo "appuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/appuser \
44
+ && chmod 0440 /etc/sudoers.d/appuser
45
 
46
  # Switch to the non-root user
47
  USER appuser
48
 
49
+
50
+
51
  COPY --chown=appuser . /srv
52
 
53
  # Command to run the application