E-slam commited on
Commit
bf8195e
·
verified ·
1 Parent(s): f33d183

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -3
Dockerfile CHANGED
@@ -16,11 +16,20 @@ RUN chown -R appuser:appuser /code
16
  # Switch to the new user
17
  USER appuser
18
 
 
 
 
 
 
 
19
  # Set the environment variable directly in the Dockerfile
20
- ENV GH_TOKEN=gh_token
21
 
22
- # Clone the repository using the environment variable for the token
23
- RUN git clone https://$GH_TOKEN@github.com/Eslam-Magdy-1297/ESearch_FletV01.git /code/ESearch_FletV01
 
 
 
24
 
25
  # Set the working directory to the cloned repository
26
  WORKDIR /code/ESearch_FletV01
 
16
  # Switch to the new user
17
  USER appuser
18
 
19
+ # Copy the rest of the application code
20
+ COPY . .
21
+
22
+ # Set the working directory to /code
23
+ WORKDIR /code
24
+
25
  # Set the environment variable directly in the Dockerfile
26
+ ENV GH_TOKEN=${GH_TOKEN}
27
 
28
+ # Use a shell script to perform the git clone operation
29
+ RUN echo "export GH_TOKEN=${GH_TOKEN}" > clone_repo.sh && \
30
+ echo "git clone https://\${GH_TOKEN}@github.com/Eslam-Magdy-1297/ESearch_FletV01.git /code/ESearch_FletV01" >> clone_repo.sh && \
31
+ chmod +x clone_repo.sh && \
32
+ ./clone_repo.sh
33
 
34
  # Set the working directory to the cloned repository
35
  WORKDIR /code/ESearch_FletV01