|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
| 2 | +// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/r |
| 3 | +{ |
| 4 | + "name": "R (rocker/r-ver base)", |
| 5 | + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
| 6 | + "image": "ghcr.io/rocker-org/devcontainer/r-ver:4.3", //commma needed if other sections are used. |
| 7 | + |
| 8 | + // Features to add to the dev container. More info: https://containers.dev/features. |
| 9 | + "features": { |
| 10 | + // if we want to install r packages using pak |
| 11 | + // more info: https://github.com/rocker-org/devcontainer-features/blob/main/src/r-packages/README.md |
| 12 | + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { |
| 13 | + "packages": "clang,clang-format,clang-tidy,cmake,doxygen,g++,gcc,libxt6,libxtst6,make,ninja-build" |
| 14 | + }, |
| 15 | + "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { |
| 16 | + "packages": "blastula,dplyr,devtools,ggplot2,jsonlite,kableExtra,methods,mockery,parsedate,Rcpp,RcppEigen,scales,snowfall,TMB,tibble,tidyr,usethis", |
| 17 | + "installSystemRequirements": true |
| 18 | + }, |
| 19 | + // option to run rstudio. you can type rserver into the command line to |
| 20 | + // get an session going (opens on a port, that you can open as a |
| 21 | + // separate browser window). |
| 22 | + // more details: https://github.com/rocker-org/devcontainer-features/blob/main/src/rstudio-server/README.md |
| 23 | + "ghcr.io/rocker-org/devcontainer-features/rstudio-server:0": {} |
| 24 | + }, |
| 25 | + // // if we want quarto cli |
| 26 | + // more info: https://github.com/rocker-org/devcontainer-features/blob/main/src/quarto-cli/README.md |
| 27 | + // "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {} |
| 28 | + // }, |
| 29 | + |
| 30 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 31 | + // "forwardPorts": [], |
| 32 | + |
| 33 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 34 | + "postCreateCommand": "echo 'options(repos = c(CRAN = \"https://cloud.r-project.org\"))' | sudo sh -c 'cat - >>\"${R_HOME}/etc/Rprofile.site\"'", |
| 35 | + |
| 36 | + // Configure tool-specific properties. |
| 37 | + "customizations": { |
| 38 | + "vscode": { |
| 39 | + // Set *default* container specific settings.json values on container create. |
| 40 | + // Add the IDs of extensions you want installed when the container is created. |
| 41 | + "extensions": [ |
| 42 | + // if we want liveshare. |
| 43 | + "ms-vsliveshare.vsliveshare", |
| 44 | + "ms-vscode.cpptools", |
| 45 | + "ms-vscode.cmake-tools", |
| 46 | + "GitHub.codespaces", |
| 47 | + "bbenoist.Doxygen", |
| 48 | + "matepek.vscode-catch2-text-adapter", |
| 49 | + "hbenl.vscode-test-explorer", |
| 50 | + "reditorsupport.r", |
| 51 | + "rdebugger.r-debugger", |
| 52 | + "github.vscode-pull-request-github" |
| 53 | + ] |
| 54 | + } |
| 55 | + |
| 56 | + |
| 57 | + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 58 | + // "remoteUser": "root" |
| 59 | +} |
| 60 | +} |
0 commit comments