daniel-saed commited on
Commit
40a95d8
·
verified ·
1 Parent(s): 864d6ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -5
Dockerfile CHANGED
@@ -14,11 +14,10 @@ RUN apt-get update && apt-get install -y \
14
  COPY requirements.txt ./
15
  COPY . ./
16
 
17
- RUN --mount=type=secret,id=MONGO_URI,mode=0444,required=true \
18
- git init && \
19
- git remote add origin $(cat /run/secrets/MONGO_URI)
20
-
21
- RUN pip3 install -r requirements.txt
22
 
23
  EXPOSE 8501
24
 
 
14
  COPY requirements.txt ./
15
  COPY . ./
16
 
17
+ # Example: Use secret during build (e.g., for a private repository)
18
+ RUN --mount=type=secret,id=MY_API_KEY,mode=0444 \
19
+ export MY_API_KEY=$(cat /run/secrets/MY_API_KEY) && \
20
+ pip3 install -r requirements.txt
 
21
 
22
  EXPOSE 8501
23