{
	"name": "R Data Science Environment",
	"build": {
		"dockerfile": "Dockerfile",
		// Update VARIANT to pick a specific R version: 4, 4.1, 4.0
		// More info: https://github.com/rocker-org/devcontainer-images/pkgs/container/devcontainer%2Ftidyverse
		"args": { "VARIANT": "4" }
	},

	// Install Dev Container Features. More info: https://containers.dev/features
	"features": {
		"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {},
		// Install JupyterLab and IRkernel.
		// More info: https://github.com/rocker-org/devcontainer-templates/tree/main/src/r-ver
		"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
			"version": "none",
			"installJupyterlab": true
		}
	},

	"customizations": {
		"vscode": {
			"extensions": [
				// Add Jupyter and Python vscode extensions
				"ms-toolsai.jupyter",
				"ms-toolsai.jupyter-renderers",
				"ms-python.python",
				"ms-python.vscode-pylance",
				"vsls-contrib.codetour",
				"GitHub.copilot"
			]
		}
	},

	// Forward Jupyter and RStudio ports
	"forwardPorts": [8787, 8888],
	"portsAttributes": {
		"8787": {
			"label": "Rstudio",
			"requireLocalPort": true,
			"onAutoForward": "ignore"
		},
		"8888": {
			"label": "Jupyter",
			"requireLocalPort": true,
			"onAutoForward": "ignore"
		}
	},

	// Use 'postAttachCommand' to run commands after the container is started.
	"postAttachCommand": "sudo rstudio-server start"

	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root
	// "remoteUser": "root"
}