Skip to content

Commit

Permalink
chore: Add Dockerfile for custom Jupyter devcontainer configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
h4rvey-g committed Nov 16, 2024
1 parent da54a30 commit f0407d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM quay.io/jupyter/r-notebook:latest

USER root
# add ${NB_UID} to NOPASSWD sudoers
RUN echo "${NB_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/added-by-start-script \
echo "${NB_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

USER ${NB_USER}
13 changes: 10 additions & 3 deletions devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "Data Science (Python and R)",
"image": "quay.io/jupyter/r-notebook:latest",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/h4rvey-g/rocker-devcontainer-features/r-apt:latest": {
"vscodeRSupport": "full",
"installRadian": true,
"installVscDebugger": true
"installVscDebugger": false
}
// "ghcr.io/h4rvey-g/rocker-devcontainer-features/apt-packages:1": {
// "packages": "r-cran-data.table,r-cran-tidyverse",
Expand All @@ -22,6 +25,10 @@
// ],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/bin/bash ./.devcontainer/postCreateCommand.sh",
// "RunArgs": [
// "--user",
// "root"
// ],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Configure tool-specific properties.
Expand Down Expand Up @@ -62,4 +69,4 @@
},
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "jovyan"
}
}

0 comments on commit f0407d7

Please sign in to comment.