setup .devcontainer#1628
Conversation
There was a problem hiding this comment.
Pull Request Overview
Sets up a development container configuration for R programming with VS Code extensions and language server support. This enables consistent R development environments using Docker containers.
- Adds
.devcontainer/devcontainer.jsonwith R-specific VS Code extensions and settings - Creates
.devcontainer/Dockerfilewith Ubuntu base image and R installation - Configures automatic installation of R language server package on container creation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .devcontainer/devcontainer.json | Configures dev container with R extensions and post-creation setup |
| .devcontainer/Dockerfile | Defines Docker image with Ubuntu base and R installation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Code Coverage SummaryDiff against mainResults for commit: e407547 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 29 suites 2m 44s ⏱️ Results for commit e407547. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit e971999 ♻️ This comment has been updated with latest results. |
…lopment (#1657) # Pull Request Configures development environments to provide consistent R development setup using pre-built Docker images and GitHub Actions. ## Development Container - Uses `ghcr.io/insightsengineering/rstudio:latest` image with R pre-installed - Configures VS Code with R extensions (language support, debugger, Quarto) - Sets up R terminal preferences (radian, httpgd plotting) - Mounts workspace to `/workspace` for consistent paths ## GitHub Copilot Agent Configuration - Adds `.github/copilot-setup-steps.yml` workflow to configure the Copilot agent environment - Uses Docker container with `ghcr.io/insightsengineering/rstudio:latest` image (same as devcontainer) - Verifies R installation with version check and `sessionInfo()` - Ensures R is available when GitHub Copilot agent works on this repository - File must exist in each repository (cannot be referenced from `r.pkg.template` due to GitHub limitations) Enables reproducible development environments without local R installation for both human developers (via devcontainer) and AI agents (via workflow configuration). Both configurations use the same Docker image to ensure consistency. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/insightsengineering/teal/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: m7pr <133694481+m7pr@users.noreply.github.com>
When GitHub Copilot Coding Agent is run, it is run in GitHub Actions environment. This yaml file, specify the setup that will be used during the execution of the job. Coding Agent will work in the same docker conatiner as is used for CI/CD. It also verifies that R is installed and presents R session, before it starts any job. This way, we allow coding agent to use R and we use the same environment as in our testing scenarios during CI/CD Fixes - insightsengineering/coredev-tasks#678 Partner to - #1628 Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
|
@llrs-roche would you be able to try it with a public open docker container? does |
|
I also can't get past this:
I confirmed my Docker Desktop is running. Also, just to add, I believe internally we're moving away from Docker and prefer Podman? @llrs-roche can you confirm? |
|
@llrs-roche @donyunardi are you logged to our GitHub Container Registry where the container is hosted? Let me know if you can run it if you login first. @donyunardi Docker Desktop in this case is only used to verify that container is running, but it's not used by the setup/instruction. |
|
@llrs-roche you can not commit or you cannot push? Changes made in the workspace should be visible outside the container and for sure you can commit and push outside the container. So if git config does not work from the inside of the container, use outside configuration and commit and push outside of the container. |
|
Hi @m7pr In my case, on Codespaces I had to stop the container like this: |
|
@m7pr I cannot commit inside the container as it doesn't reuse the key to sign it, as I cannot commit I haven't pushed (I haven't tested pushing changes committed outside the devcontainer) but I guess it will work. |
|
@llrs-roche I have the same that I can pull and commit, but something crashes during push. But I can push from the terminal, that is outside the container. |
|
@osenan locally you first close Remote Connection, and then you can stop docker container locally trhough Docker Desktop or by using terminal. |
|
@donyunardi @chizapoth looking for your feedback as well. Just wondering if you were able to run it locally and in codespaces. |
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>












An attempt to setup
.devcontainerstructure so that you can use pre-defined Docker image with R installed And potentially many more R packages LOCALLY in your VS Code or for interactive live github copilot coding environmentCloses
Allows to open VS Code / Cursor in a pre-created docker image that is also used during CI/CD testing
Steps to reproduce - locally in VS Code / Cursor
devcontainerfor you to work"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind"in.devcontainer.jsonSteps to reproduce - remotely in GitHub Codespaces