Spaces:
Running
Running
mount the secret
Browse files- 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 |
-
#
|
23 |
-
RUN
|
|
|
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
|