Development container focused on Python (with first-class R support) providing a reproducible, batteries‑included environment. It ships with the VS Code Dev Containers extension assets, curated tooling, and a consistent tagging strategy for deterministic rebuilds.
- Published Container
- Quick Start
- Using in SDF TRE
- Documentation
- What's Included
- R Language Support
- VS Code Server
- Adding Extensions
- Automated Builds & Tag Strategy
- Contributing
- License
Built and published automatically to GitHub Container Registry (GHCR):
- Registry:
ghcr.io - Image:
ghcr.io/smartdatafoundry/devcontainer - Tag Families:
latest– Most recent stable main buildmain– Moving pointer to HEAD of mainmain-<branch-sha>– Immutable build for a specific main commitpr-<number>– Ephemeral preview for a pull requestvscode-<vscode-sha>– Locks VS Code Server version (container content may still move)vscode-<vscode-sha>-<branch-sha>– Fully reproducible (VS Code Server + container commit)
Recommended:
- Daily development:
latest - CI / Reproducibility:
vscode-<vscode-sha>-<branch-sha> - VS Code Server pin only:
vscode-<vscode-sha>
Add this to your .devcontainer/devcontainer.json:
{
"name": "Python Development",
"image": "ghcr.io/smartdatafoundry/devcontainer:latest"
}The devcontainer includes setup scripts for easy deployment in the SDF TRE:
# 1. Pull the container image
ces-pull a a ghcr.io/smartdatafoundry/devcontainer:latest
# 2. Extract the setup scripts
podman run --rm -v $HOME:$HOME -w $HOME \
ghcr.io/smartdatafoundry/devcontainer:latest \
cp -r /opt/devcontainerctl $HOME/devcontainerctl
# 3. Run the setup script (one-time setup)
cd $HOME/devcontainerctl
./setup.sh
# 4. Start your devcontainer
devcontainerctl startThe setup script will:
- Create a symlink to
devcontainerctlin~/bin - Add
~/binto your PATH - Configure a daily cron job (8:00 AM) to update your container with the latest version
Available devcontainerctl commands:
devcontainerctl start- Start container with existing imagedevcontainerctl stop- Stop the containerdevcontainerctl restart- Restart the containerdevcontainerctl status- Check container statusdevcontainerctl sync- Update the container imagedevcontainerctl update- Update and restart with new imagedevcontainerctl remove- Stop and remove the container
For detailed manual setup instructions, see the SDF TRE Setup Guide.
- Clone this repository
- Open in VS Code
- Select "Reopen in Container" when prompted
| Topic | Reference |
|---|---|
| SDF TRE usage | docs/SDF_TRE_SETUP.md |
| Full container internals | docs/DEVCONTAINER.md |
| Setup scripts | devcontainerctl/ directory |
| Reusable publish workflow | docs/BUILD_PUBLISH_CONTAINER.md |
| Dev Container Specification | https://containers.dev |
- Base: Ubuntu 24.04 (Noble) via Microsoft's devcontainers base image
- Python: System Python with development tools (via devcontainer feature)
- R: Full R language support with development tools (via Rocker Project devcontainer feature)
- Git: Latest version with configuration support
- Shell: Zsh with Oh My Zsh (via common-utils feature)
- Quarto: Document publishing platform (latest version)
- Marimo: Markdown presentation tool, alternative to Jupyter Notebooks
- User Setup Scripts: Automated deployment and management tools (
devcontainerctl/) - VS Code Extensions (curated):
- Continue (AI assistant)
- Black (Python formatting)
- Jupyter
- Marimo
- Markdown All in One
- Rainbow CSV
- (See
.devcontainer/vscode-init/extensions-to-install.txtfor authoritative list)
- VS Code Server: Pre-installed for immediate development
This dev container includes comprehensive R language support through the Rocker Project's devcontainer features. The R feature provides:
- R Installation: Latest R version via apt package manager
- Development Tools: devtools, renv for package management
- IDE Integration:
- languageserver package for VS Code R extension support
- httpgd package for interactive graphics
- rmarkdown for document generation
- Jupyter Integration: R kernel for Jupyter notebooks
- Interactive Console: radian (enhanced R console with syntax highlighting)
- Debugging Support: vscDebugger package for VS Code R debugging
Pre-installed. Pin a version using the tag families described above or via build arg VSCODE_COMMIT (default: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084). For environment-specific considerations (e.g. TRE) see docs/SDF_TRE_SETUP.md.
To add new VS Code extensions to the container, follow these steps:
- Open the appropriate file in
.devcontainer/vscode-init/:extensions-to-install.txtfor extensions to install directlyextensions-to-download.txtfor extensions that you want to be downloaded
- Add the identifier of the desired extension in the format
publisher.extensionNameon a new line. - Save the changes to the extension file.
- Commit and push the changes to your repository to trigger the build workflow with the updated extensions
Workflow: .github/workflows/build-devcontainer.yml
Triggers:
- Pull Requests touching devcontainer/workflow files → build +
pr-<number>tag - Manual dispatch (with required
vscode_commitinput) → publish full tag set
Outputs per production run:
latest,main,main-<branch-sha>vscode-<vscode-sha>,vscode-<vscode-sha>-<branch-sha>
Manual build steps:
- Open Actions → Build and Publish Dev Container
- Run workflow, supplying VS Code Server commit hash
- Await completion & verify tags on GHCR package page
Tag usage quick reference:
| Need | Tag |
|---|---|
| Stable rolling | latest |
| Immutable main snapshot | main-<sha> |
| Test PR | pr-<number> |
| Pin VS Code Server only | vscode-<vscode-sha> |
| Full reproducibility | vscode-<vscode-sha>-<sha> |
Reusable generic Docker workflow documentation: see docs/BUILD_PUBLISH_CONTAINER.md.
Workflow: .github/workflows/update-vscode.yml
An automated workflow that:
- Runs daily at 2:00 AM UTC to check for new VS Code releases
- Compares the latest stable VS Code commit hash with the current version in the Dockerfile
- Automatically creates a PR when a new version is available
- Enables auto-merge to update the container once all checks pass
This ensures the devcontainer stays up-to-date with the latest VS Code releases without manual intervention.
For detailed configuration and usage information, see docs/VSCODE_AUTO_UPDATE.md.
Contribution workflow is standard GitHub Flow. See section above plus open issues for opportunities.
License: MIT
