Jhsmit commited on
Commit
13b901d
·
1 Parent(s): 740919f

mount the secret

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -16,11 +16,11 @@ WORKDIR /app
16
 
17
  # Clone the private repo using the GitHub token
18
  # We'll use build arguments and ARGs to pass the token
19
- ARG GITHUB_TOKEN
20
  ARG REPO_URL="github.com/Jhsmit/instagibbs.git"
21
 
22
- # Clone the repo
23
- RUN git clone https://${GITHUB_TOKEN}@${REPO_URL} instagibbs
 
24
 
25
  # Install requirements
26
  WORKDIR /app/instagibbs
 
16
 
17
  # Clone the private repo using the GitHub token
18
  # We'll use build arguments and ARGs to pass the token
 
19
  ARG REPO_URL="github.com/Jhsmit/instagibbs.git"
20
 
21
+ # The secret 'github_token' must be provided during the build
22
+ RUN --mount=type=secret,id=GITHUB_TOKEN \
23
+ git clone https://$(cat /run/secrets/GITHUB_TOKEN)@${REPO_URL} instagibbs
24
 
25
  # Install requirements
26
  WORKDIR /app/instagibbs