Skip to content
Merged
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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
Comment thread
m7pr marked this conversation as resolved.
Outdated
],
"postCreateCommand": "Rscript -e 'install.packages(c(\"languageserver\"), repos=\"https://cloud.r-project.org\")'"
}