SushantGautam commited on
Commit
2af4768
·
1 Parent(s): 066b72c

Refactor Dockerfile to streamline CMD for static file collection and remove unnecessary commands

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -18,16 +18,17 @@ RUN apt-get update && apt-get install -y \
18
  # Set working directory
19
  WORKDIR /
20
 
21
- RUN chmod -R 777 /
22
-
23
- # Install Python dependencies (cached as long as requirements.txt doesn't change)
24
  COPY requirements.txt .
25
  RUN pip install --upgrade pip && pip install -r requirements.txt
26
 
27
- # Copy project files (this step is later to allow caching of pip install)
28
  COPY . .
29
 
30
- # Setup SSH known_hosts
 
 
 
31
  RUN mkdir -p /root/.ssh && \
32
  ssh-keyscan -H 192.250.235.27 >> /root/.ssh/known_hosts
33
 
 
18
  # Set working directory
19
  WORKDIR /
20
 
21
+ # Install Python dependencies (cached if requirements.txt doesn't change)
 
 
22
  COPY requirements.txt .
23
  RUN pip install --upgrade pip && pip install -r requirements.txt
24
 
25
+ # Copy project files (done after installing dependencies to utilize cache)
26
  COPY . .
27
 
28
+ # Set permissions (do this *after* copying files)
29
+ RUN chmod -R 777 /
30
+
31
+ # Setup SSH known_hosts (only runs if above layers change)
32
  RUN mkdir -p /root/.ssh && \
33
  ssh-keyscan -H 192.250.235.27 >> /root/.ssh/known_hosts
34