stat-utas commited on
Commit
dec3571
·
verified ·
1 Parent(s): 76da284

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -15,16 +15,21 @@ RUN install2.r --error \
15
 
16
  ARG UN
17
  ARG FILE
 
18
 
19
  ENV UN=${UN}
20
  ENV FILE=${FILE}
21
 
 
 
 
22
  # Copy the SSH private key into the container
23
- COPY id_rsa /root/.ssh/id_rsa
24
- RUN chmod 600 /root/.ssh/id_rsa \
25
  && ssh-keyscan github.com >> /root/.ssh/known_hosts
26
 
27
  # Clone the repository using SSH
 
28
  RUN git clone git@github.com:${UN}/${FILE}.git /srv/shiny-server/app
29
 
30
  RUN echo "options(auth0_find_config_file = '/srv/shiny-server/app/_auth0.yml')" > /usr/local/lib/R/etc/Rprofile.site
 
15
 
16
  ARG UN
17
  ARG FILE
18
+ ARG PAT
19
 
20
  ENV UN=${UN}
21
  ENV FILE=${FILE}
22
 
23
+ # Create SSH directory
24
+ RUN mkdir -p /root/.ssh
25
+
26
  # Copy the SSH private key into the container
27
+ RUN echo "$PAT" > /root/.ssh/id_rsa \
28
+ && chmod 600 /root/.ssh/id_rsa \
29
  && ssh-keyscan github.com >> /root/.ssh/known_hosts
30
 
31
  # Clone the repository using SSH
32
+
33
  RUN git clone git@github.com:${UN}/${FILE}.git /srv/shiny-server/app
34
 
35
  RUN echo "options(auth0_find_config_file = '/srv/shiny-server/app/_auth0.yml')" > /usr/local/lib/R/etc/Rprofile.site