From de24ddf435960b5c80c805e536e20125e895511b Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sun, 29 Dec 2024 17:58:48 +0800 Subject: [PATCH] Devcontainer (#41) * copy .devcontainer from lintr * localize * R ignores --- .Rbuildignore | 1 + .devcontainer/Dockerfile | 11 +++++++++++ .devcontainer/devcontainer.json | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.Rbuildignore b/.Rbuildignore index 14f8e9c..e89e504 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,5 +1,6 @@ ^.*\.Rproj$ ^\.Rproj\.user$ +^\.devcontainer$ ^\.github$ ^funchir_.*\.tar\.gz$ ^\.lintr\.R$ diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..f876d2b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +FROM rocker/r-base + +RUN apt-get -qq update && \ + apt-get install -y --no-install-recommends git + +COPY DESCRIPTION . + +RUN Rscript -e ' \ + install.packages("remotes"); \ + remotes::install_deps(dependencies = "Imports") \ +' diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..b30eaba --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,3 @@ +{ + "build": { "dockerfile": "Dockerfile", "context": ".."} +}