Update Dockerfile
Browse files- Dockerfile +9 -5
Dockerfile
CHANGED
@@ -13,12 +13,16 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
13 |
# Copy the rest of your application's code into the container
|
14 |
COPY . .
|
15 |
|
|
|
|
|
16 |
# Initialize a Git repository and set up remotes with secrets
|
17 |
-
#
|
18 |
-
RUN git init && \
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
22 |
|
23 |
# Specify the command to run on container start
|
24 |
CMD ["python", "app.py"]
|
|
|
13 |
# Copy the rest of your application's code into the container
|
14 |
COPY . .
|
15 |
|
16 |
+
# ...
|
17 |
+
|
18 |
# Initialize a Git repository and set up remotes with secrets
|
19 |
+
# Mount secrets for each remote
|
20 |
+
RUN --mount=type=secret,id=public_key,mode=0444,required=true git init && \
|
21 |
+
git remote add remote1 $(cat /run/secrets/public_key)
|
22 |
+
RUN --mount=type=secret,id=private_key,mode=0444,required=true git remote add remote2 $(cat /run/secrets/private_key)
|
23 |
+
RUN --mount=type=secret,id=url_endpoint,mode=0444,required=true git remote add remote3 $(cat /run/secrets/url_endpoint)
|
24 |
+
|
25 |
+
# ...
|
26 |
|
27 |
# Specify the command to run on container start
|
28 |
CMD ["python", "app.py"]
|