From a91c32e3bb28a62ebec32b93dcf4a6ff8514997e Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sun, 28 Jan 2024 19:14:16 +0900 Subject: [PATCH 1/2] dev(devcontainer): change to install R via rig and using pak --- .devcontainer/Dockerfile | 14 -------------- .devcontainer/devcontainer.json | 11 ++++++++++- 2 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 1d2b7038..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM rocker/r-base - -RUN apt-get -qq update && \ - apt-get install -y --no-install-recommends git libxml2-dev - -COPY DESCRIPTION . - -RUN Rscript -e ' \ - install.packages("remotes"); \ - remotes::install_deps(dependencies = c( \ - "Imports", \ - "Config/needs/development" \ - )) \ -' \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b30eaba3..4a3d6cf5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,12 @@ { - "build": { "dockerfile": "Dockerfile", "context": ".."} + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "libxml2-dev" + }, + "ghcr.io/rocker-org/devcontainer-features/r-rig:1": {} + }, + "updateContentCommand": { + "r-tools": "Rscript -e 'pak::local_install_deps(dependencies = c(\"all\", \"Config/Needs/development\"))'" + } } From 336b9d4282b6d740f789b9fa47291b8a45318471 Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sun, 28 Jan 2024 19:19:54 +0900 Subject: [PATCH 2/2] ci: add dependabot config for devcontainers --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 12301490..f1b4e402 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,8 @@ updates: directory: "/" schedule: interval: "daily" + + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: "daily"