dakunesu commited on
Commit
6f93262
·
verified ·
1 Parent(s): d5f57d0

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -11,25 +11,20 @@ ADD http://worldtimeapi.org/api/timezone/Asia/Jakarta version.json
11
  ENV TZ=Asia/Jakarta
12
 
13
  # git clone from private repo
14
- RUN --mount=type=secret,id=GIT_REPO,mode=0444,required=true git clone $(cat /run/secrets/GIT_REPO) /app
15
 
16
  # install packages from packages.txt (apt-get install) using xargs
17
- COPY packages.txt .
18
  RUN xargs apt-get -y install < packages.txt
19
 
20
- # Set the working directory inside the container
21
- WORKDIR /app
22
 
23
- # allow permissions
24
- RUN chmod -R 777 /app
25
 
26
  # Install the Python dependencies
27
- COPY requirements.txt .
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
- # Copy all the files from the host machine to the working directory in the container
31
- COPY . .
32
-
33
  # Set the command to run when the container starts
34
  # This command will start the Flask application
35
  CMD ["python", "src/app.py"]
 
11
  ENV TZ=Asia/Jakarta
12
 
13
  # git clone from private repo
14
+ RUN --mount=type=secret,id=GIT_REPO,mode=0444,required=true git clone $(cat /run/secrets/GIT_REPO) .
15
 
16
  # install packages from packages.txt (apt-get install) using xargs
 
17
  RUN xargs apt-get -y install < packages.txt
18
 
19
+ # allo permissions root
20
+ RUN cd ~ && chmod -R 777 .
21
 
22
+ # allow permissions this step
23
+ RUN chmod -R 777 .
24
 
25
  # Install the Python dependencies
 
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
 
 
 
28
  # Set the command to run when the container starts
29
  # This command will start the Flask application
30
  CMD ["python", "src/app.py"]