Spaces:
Running
Running
James McCool
commited on
Commit
·
d18edc5
1
Parent(s):
5896804
Update Dockerfile to clone MongoDB URI repository at build time, replacing previous git initialization and remote setup. This change enhances the handling of secrets during the Docker build process.
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
@@ -13,8 +13,11 @@ COPY requirements.txt ./
|
|
13 |
COPY src/ ./src/
|
14 |
|
15 |
RUN --mount=type=secret,id=mongo_uri,mode=0444,required=true \
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
18 |
|
19 |
RUN pip3 install -r requirements.txt
|
20 |
|
|
|
13 |
COPY src/ ./src/
|
14 |
|
15 |
RUN --mount=type=secret,id=mongo_uri,mode=0444,required=true \
|
16 |
+
cat /run/secrets/mongo_uri > /test
|
17 |
+
|
18 |
+
# Get secret SECRET_EXAMPLE and clone it as repo at buildtime
|
19 |
+
RUN --mount=type=secret,id=mongo_uri,mode=0444,required=true \
|
20 |
+
git clone $(cat /run/secrets/mongo_uri)
|
21 |
|
22 |
RUN pip3 install -r requirements.txt
|
23 |
|