Skip to content

devcontainer? #466

@grantmcdermott

Description

@grantmcdermott

Recently, I'm having to do more of my dev work on a Mac because of work... which means that I can't run our test suite (which requires Linux) without a running container (Docker/finch/etc.)

I've got a simple .devcontainer/devcontainer.json file that I use locally for this, but I was thinking it might be useful to add it to the repo for others to use too?

{
  "name": "tinyplot devcontainer",
  "image": "rocker/r2u:24.04",
  
  "containerEnv": {
    "NOT_CRAN": "true"
  },
  
  "postCreateCommand": "R -e \"install.packages(c('devtools', 'tinytest', 'tinysnapshot'))\" && R -e \"install.packages('httpgd', repos = c('https://community.r-multiverse.org', 'https://cloud.r-project.org'))\" && Rscript -e 'read.dcf(\"DESCRIPTION\", c(\"Imports\", \"Suggests\")) |> tools:::.split_dependencies() |> names() |> setdiff(tools:::.get_standard_package_names()$base) |> install.packages()'",
  
  "customizations": {
    "vscode": {
      "extensions": [
        "REditorSupport.r",
        "quarto.quarto"
      ],
      "settings": {
        "r.plot.useHttpgd": true
      }
    }
  },
  
  "remoteUser": "root"
}

@vincentarelbundock Do you use WSL or something similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions