-
Notifications
You must be signed in to change notification settings - Fork 22
/
6_rstudio.Dockerfile
44 lines (39 loc) · 1.42 KB
/
6_rstudio.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Harden rstudio-server
RUN mkdir -p /etc/rstudio && \
echo "www-frame-origin=none" >> /etc/rstudio/rserver.conf && \
echo "www-enable-origin-check=1" >> /etc/rstudio/rserver.conf && \
echo "www-same-site=lax" >> /etc/rstudio/rserver.conf && \
echo "restrict-directory-view=1" >> /etc/rstudio/rsession.conf && \
# https://github.com/rstudio/rstudio/issues/14060
echo "rsession-ld-library-path=/opt/conda/lib" >> /etc/rstudio/rserver.conf
ENV PATH=$PATH:/usr/lib/rstudio-server/bin
RUN mamba install --quiet --yes \
'r-rodbc' \
'r-tidyverse' \
'r-arrow' \
'r-aws.s3' \
'r-catools' \
&& \
clean-layer.sh && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
# Install some default R packages
RUN mamba install --quiet --yes \
'r-hdf5r' \
'r-odbc' \
'r-sf' \
'r-e1071' \
'r-markdown' \
&& \
clean-layer.sh && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
RUN python3 -m pip install \
'jupyter-rsession-proxy==2.2.0' \
'jupyter-server-proxy==4.2.0' \
'jupyter-shiny-proxy==1.1' && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
# If using the docker bit in other Dockerfiles, this must get written over in a later layer
ENV DEFAULT_JUPYTER_URL="/rstudio"
ENV GIT_EXAMPLE_NOTEBOOKS=https://github.com/StatCan/aaw-contrib-r-notebooks.git