From 7c03d7c681da5d10fdb685458620b7fb25f6f8f7 Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Tue, 18 Jun 2024 13:57:23 -0700 Subject: [PATCH 1/2] Make extensions dir as root and give to nb_user --- ci/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/Dockerfile b/ci/Dockerfile index 69fdd3a..55c7d61 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -8,6 +8,9 @@ USER root ENV QUARTO_CLI=https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.433/quarto-1.3.433-linux-amd64.deb +ENV CODE_EXT_DIR=/opt/code-server/extensions +RUN mkdir -p ${VSCODE_EXT_DIR} && chown -R ${NB_USER}: ${VSCODE_EXT_DIR} + RUN wget -O /tmp/quarto.deb ${QUARTO_CLI} && dpkg -i /tmp/quarto.deb && rm -rf /tmp/quarto.deb && apt-get clean USER ${NB_USER} @@ -16,8 +19,7 @@ WORKDIR ${HOME}/.kernels RUN chmod +x install-kernels.sh && cd /home/jovyan/.kernels && ./install-kernels.sh environments -RUN mkdir -p /opt/code-server/extensions && \ - echo "extensions-dir: /opt/code-server/extensions" >> $HOME/.config/code-server/config.yaml && \ +RUN echo "extensions-dir: $VSCODE_EXT_DIR" >> $HOME/.config/code-server/config.yaml && \ EXT_LIST="ms-python.python quarto.quarto" && \ for EXT in $EXT_LIST; do code-server --install-extension $EXT; done From 921ec252f7526b6bda2f0198d5b9881e33df4884 Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Tue, 18 Jun 2024 13:58:59 -0700 Subject: [PATCH 2/2] fix var name --- ci/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/Dockerfile b/ci/Dockerfile index 55c7d61..c2b8a41 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -8,7 +8,7 @@ USER root ENV QUARTO_CLI=https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.433/quarto-1.3.433-linux-amd64.deb -ENV CODE_EXT_DIR=/opt/code-server/extensions +ENV VSCODE_EXT_DIR=/opt/code-server/extensions RUN mkdir -p ${VSCODE_EXT_DIR} && chown -R ${NB_USER}: ${VSCODE_EXT_DIR} RUN wget -O /tmp/quarto.deb ${QUARTO_CLI} && dpkg -i /tmp/quarto.deb && rm -rf /tmp/quarto.deb && apt-get clean