jameshwade commited on
Commit
15d3c9a
·
1 Parent(s): fc628dc

add secret to .Renviron

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -9,10 +9,10 @@ USER user
9
  # Set home to the user's home directory
10
  ENV HOME=/home/user \
11
  PATH=/home/user/.local/bin:$PATH \
12
- R_LIBS_USER=$HOME/R/library
13
 
14
  # Create a personal R library directory
15
- RUN mkdir -p $R_LIBS_USER
16
 
17
  # Set the working directory to the user's home directory
18
  WORKDIR $HOME/app
@@ -28,7 +28,8 @@ RUN install2.r --error \
28
  glue \
29
  httr2
30
 
31
- RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true
 
32
 
33
  EXPOSE 7860
34
 
 
9
  # Set home to the user's home directory
10
  ENV HOME=/home/user \
11
  PATH=/home/user/.local/bin:$PATH \
12
+ R_LIBS_USER=/home/user/R/library
13
 
14
  # Create a personal R library directory
15
+ RUN mkdir -p /home/user/R/library
16
 
17
  # Set the working directory to the user's home directory
18
  WORKDIR $HOME/app
 
28
  glue \
29
  httr2
30
 
31
+ RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
32
+ echo "OPENAI_API_KEY=$(cat /run/secrets/OPENAI_API_KEY)" >> $HOME/.Renviron
33
 
34
  EXPOSE 7860
35