diff --git a/docker_atom/work/script-setup.sh b/docker_atom/work/script-setup.sh index b2551073..4d103a36 100644 --- a/docker_atom/work/script-setup.sh +++ b/docker_atom/work/script-setup.sh @@ -67,9 +67,10 @@ setup_node() { && mv /opt/node* /opt/node \ && echo "PATH=/opt/node/bin:$PATH" >> /etc/bash.bashrc \ && export PATH=/opt/node/bin:$PATH \ - && npm install -g npm \ + && npm install -g npm yarn \ && ln -s /opt/node/bin/* /usr/bin/ \ - && echo "@ Version of Node, npm, and yarn:" `node -v` `npm -v` + && echo "@ Version of Node, npm, and yarn:" `node -v` `npm -v` \ + && echo "@ Version of Yarn:" `yarn -v` } @@ -98,6 +99,13 @@ setup_R_rstudio() { && echo "auth-none=1" >> /etc/rstudio/rserver.conf \ && echo "auth-minimum-user-id=0" >> /etc/rstudio/rserver.conf \ && echo "auth-validate-users=0" >> /etc/rstudio/rserver.conf \ + && echo "www-allow-origin=*" >> /etc/rstudio/rserver.conf \ + && echo "www-same-site=none" >> /etc/rstudio/rserver.conf \ + && echo "www-frame-origin=same" >> /etc/rstudio/rserver.conf \ + && echo "www-verify-user-agent=0">> /etc/rstudio/rserver.conf \ + && echo "database-config-file=/etc/rstudio/db.conf" >> /etc/rstudio/rserver.conf \ + && echo "provider=sqlite" >> /etc/rstudio/db.conf \ + && echo "directory=/etc/rstudio/" >> /etc/rstudio/db.conf \ && printf "USER=root rserver --www-port=8888" > /usr/local/bin/start-rstudio.sh \ && chmod u+x /usr/local/bin/start-rstudio.sh diff --git a/docker_dev/Dockerfile b/docker_dev/Dockerfile index d6f227dc..676533d3 100644 --- a/docker_dev/Dockerfile +++ b/docker_dev/Dockerfile @@ -17,7 +17,10 @@ ARG ARG_KEEP_NODEJS=true COPY work /opt/utils/ # Setup Jupyter: Basic Configurations and Extensions... -RUN source /opt/utils/script-extend.sh \ +RUN mkdir -pv /opt/conda/etc/jupyter/ \ + && mv /opt/utils/jupyter_notebook_config.json /opt/conda/etc/jupyter/ \ + && mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \ + && source /opt/utils/script-extend.sh \ && for profile in $(echo $ARG_PROFILE_JUPYTER | tr "," "\n") ; do ( setup_jupyter_${profile} || true ) ; done # If not keeping NodeJS, remove NoedJS to reduce image size diff --git a/docker_dev/work/script-extend.sh b/docker_dev/work/script-extend.sh index aedb1e51..413707f6 100644 --- a/docker_dev/work/script-extend.sh +++ b/docker_dev/work/script-extend.sh @@ -3,12 +3,8 @@ source /opt/utils/script-utils.sh setup_jupyter_base() { # TEMP fix: nbconvert requires mistune>=0.8.1,<2 for now pip install -Uq jupyterhub jupyterlab notebook ipywidgets qpod_hub "mistune>=0.8.1,<2" \ - && mkdir -p /opt/conda/etc/jupyter/ \ - && mv /opt/utils/jupyter_notebook_config.json /opt/conda/etc/jupyter/ \ - && jupyter nbextension enable --py widgetsnbextension \ - && echo "@ Version of Yarn:" `yarn -v` \ + && jupyter nbextension enable --py widgetsnbextension \ && jupyter labextension install @jupyter-widgets/jupyterlab-manager \ - && mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \ && echo "@ Version of Jupyter Notebook/JupyterLab:" \ `jupyter notebook --version` `jupyter lab --version` }