Update Dockerfile
Browse files- 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 |
-
|
| 18 |
-
|
| 19 |
-
|
| 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 |
|