Skip to content

Commit

Permalink
Add a new devcontainer for ancient R (#6381)
Browse files Browse the repository at this point in the history
* Add a new devcontainer for ancient R

* ws

* ws

* Can't use |>

* Use ';' (not real newlines in docker string)

* Add repos=; skip unavailable packages

* Missing ')'
  • Loading branch information
MichaelChirico authored Aug 20, 2024
1 parent 6bf4005 commit 2fc9e8c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/r-ancient-gcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM registry.gitlab.com/jangorecki/dockerfiles/r-3.3.0

RUN apt-get -qq update \
&& apt-get install -y --no-install-recommends git

COPY DESCRIPTION .

RUN Rscript -e ' \
options(repos = "https://cloud.r-project.org"); \
dcf = read.dcf("DESCRIPTION", c("Imports", "Suggests")); \
deps = names(tools:::.split_dependencies(dcf)); \
standard_pkgs = tools:::.get_standard_package_names(); \
deps = intersect(deps, rownames(available.packages())); \
install.packages(setdiff(deps, standard_pkgs$base)); \
'

# setup cc()
WORKDIR /root
COPY .devcontainer/.Rprofile .
9 changes: 9 additions & 0 deletions .devcontainer/r-ancient-gcc/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"build": { "dockerfile": "Dockerfile", "context": "../.." },
"customizations": { "vscode": {
"extensions": [
"REditorSupport.r",
"ms-vscode.cpptools-extension-pack"
]
}}
}

0 comments on commit 2fc9e8c

Please sign in to comment.