diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..7021efdd1f --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,12 @@ +# Use a base image with Ubuntu +FROM mcr.microsoft.com/devcontainers/base:ubuntu + +# Install R +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + r-base \ + r-base-dev \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Set default shell +SHELL ["/bin/bash", "-c"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..4202675d3d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,14 @@ +{ + "name": "R Environment", + "build": { + "dockerfile": "Dockerfile" + }, + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" + }, + "extensions": [ + "Ikuyadeu.r", // R language support in VS Code + "REditorSupport.r-lsp" // R Language Server + ], + "postCreateCommand": "Rscript -e 'install.packages(c(\"languageserver\"), repos=\"https://cloud.r-project.org\")'" +}