Mythus commited on
Commit
87abb41
·
verified ·
1 Parent(s): 7d4f02f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -9
Dockerfile CHANGED
@@ -15,15 +15,9 @@ RUN pip3 install flask flask_restful
15
  RUN pip3 install playwright
16
  RUN playwright install
17
 
18
- # Set the environment variable for GitHub token
19
- ARG GITHUB_TOKEN
20
- ENV GITHUB_TOKEN=${GITHUB_TOKEN}
21
-
22
- # Print GitHub token for verification
23
- RUN echo "GitHub token: ${GITHUB_TOKEN}"
24
-
25
- # Clone the repository using the GitHub token
26
- RUN git clone https://${GITHUB_TOKEN}@github.com/UrloMythus/Mysterious.git /app
27
 
28
  # Copy README.md from local (adjust path if needed)
29
  COPY README.md /app/README.md
 
15
  RUN pip3 install playwright
16
  RUN playwright install
17
 
18
+ # Expose the secret GITHUB_TOKEN at buildtime and use its value in git clone command
19
+ RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
20
+ git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/UrloMythus/Mysterious.git /app || true
 
 
 
 
 
 
21
 
22
  # Copy README.md from local (adjust path if needed)
23
  COPY README.md /app/README.md