Spaces:
Runtime error
Runtime error
Commit
·
14437d9
1
Parent(s):
7107d66
update container to expose secrets
Browse files- Dockerfile +4 -0
Dockerfile
CHANGED
@@ -2,6 +2,10 @@ FROM rocker/shiny-verse:latest
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
|
|
|
|
|
|
|
|
5 |
# Install stable packages from CRAN
|
6 |
RUN install2.r --error \
|
7 |
shiny \
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
+
# Expose the secret OPENAI_API_KEY at buildtime and use its value as an environment variable
|
6 |
+
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
7 |
+
echo "OPENAI_API_KEY=$(cat /run/secrets/OPENAI_API_KEY)" > .env
|
8 |
+
|
9 |
# Install stable packages from CRAN
|
10 |
RUN install2.r --error \
|
11 |
shiny \
|