Customized Docker images for RStudio Server with scientific computing packages, supporting multiple R versions.
Available on:
- Docker Hub:
zatzmanm/rstudio - GitHub Container Registry:
ghcr.io/mjz1/rstudio-img
zatzmanm/rstudio:4.3orghcr.io/mjz1/rstudio-img:4.3- Latest R 4.3.Xzatzmanm/rstudio:4.4orghcr.io/mjz1/rstudio-img:4.4- Latest R 4.4.Xzatzmanm/rstudio:4.5orghcr.io/mjz1/rstudio-img:4.5- Latest R 4.5.Xzatzmanm/rstudio:4.6orghcr.io/mjz1/rstudio-img:4.6- Latest R 4.6.Xzatzmanm/rstudio:latestorghcr.io/mjz1/rstudio-img:latest- Points to R 4.6 (highest version)
All images ship the latest stable RStudio Server release regardless of R version — the rocker base images pin the RStudio version that was current when each R version was last built, and this repo upgrades it at build time.
For each GitHub release (e.g., v1.0.0), the following additional tags are created on both registries:
v1.0.0- Release snapshotv1.0.0-r4.3- Release + R 4.3v1.0.0-r4.4- Release + R 4.4v1.0.0-r4.5- Release + R 4.5v1.0.0-r4.6- Release + R 4.6
- Docker Desktop or Docker Engine
- Docker Compose (for local development)
- 8GB+ RAM recommended
- 10GB+ disk space
Run RStudio Server locally (using either Docker Hub or GHCR):
# From Docker Hub
docker run -d -p 8787:8787 -e PASSWORD=yourpassword zatzmanm/rstudio:latest
# Or from GitHub Container Registry
docker run -d -p 8787:8787 -e PASSWORD=yourpassword ghcr.io/mjz1/rstudio-img:latestAccess at http://localhost:8787
- Username:
rstudio - Password:
yourpassword
Note: Images are built for linux/amd64 (AMD64/x86_64). Docker automatically handles emulation on linux/arm64 (ARM64) hosts (e.g., Apple Silicon).
-
Clone the repository:
git clone https://github.com/zatzmanm/rstudio-img.git cd rstudio-img -
Copy the example environment file:
cp .env.example .env
-
Edit
.envto configure your setup:# R version (4.3, 4.4, 4.5, or 4.6) R_VERSION=4.6 # RStudio credentials RSTUDIO_USER=rstudio RSTUDIO_PASSWORD=yourpassword
-
Start the container:
docker-compose up -d
-
Access RStudio at http://localhost:8787
The ./work and ./data directories are automatically mounted for persistent storage.
For convenience, use the provided Makefile:
# View all available commands
make help
# Start RStudio Server
make up
# View logs
make logs
# Build specific R version
make build-4.6
# Lint code
make lint
# Stop and cleanup
make downBuild for a specific R version:
docker build --build-arg R_VERSION=4.6 -t rstudio-local:4.6 .Run the built image:
docker run -d -p 8787:8787 -e PASSWORD=rstudio rstudio-local:4.6By default the build installs the latest stable RStudio Server release. To pin an exact version (or use the preview/daily channel):
docker build --build-arg R_VERSION=4.6 --build-arg RSTUDIO_VERSION=2026.06.0+242 -t rstudio-local:4.6 .- Statistical packages (base R, recommended packages)
- Data manipulation (tidyverse ecosystem ready)
- Machine learning libraries support
- Bioinformatics tools (Bowtie2, etc.)
- Git + Git LFS
- CMake, Make, Automake
- Compilers (GCC, Rust, Cargo)
- Python 3
- Quarto (latest version)
- TinyTeX (LaTeX distribution), installed to
/opt/TinyTeXand onPATHfor all users - Pandoc
- Headless Google Chrome, for HTML→image/PDF rendering via
chromote(webshot2,gt::gtsave("*.png"),pagedown). It runs rootless:CHROMOTE_CHROMEpoints at a--no-sandboxwrapper, since Chrome's sandbox cannot initialise under Singularity.
Both are enabled in /etc/rstudio/rsession.conf and require the user to sign in
before anything is sent anywhere.
- GitHub Copilot (
copilot-enabled=1) - Posit Assistant (
posit-assistant-enabled=1,allow-posit-assistant=1), requires RStudio Server ≥ 2026.04. On first use RStudio downloads the assistant agent (~3.7 MB) fromcdn.posit.cointo~/.posit/assistant, so the machine running the session needs outbound HTTPS to that host.
To disable Posit Assistant for all users of a derived image, set
allow-posit-assistant=0 — that is the option which actually gates the feature,
not posit-assistant-enabled, which already defaults to 1.
- OpenCL support
- GPU: one image serves both CPU and GPU. The host driver is exposed by the
runtime (
singularity exec --nv,docker --gpus); the CUDA toolkit is not in the image —torchdownloads a CUDA-enabled backend into the package library and bundles its own cuBLAS/cuDNN.- The image does ship system
libcudart(both CUDA majors, ~5 MB). R torch'sliblantern.solinks the plain sonamelibcudart.so.12and loads it fromldconfig; PyTorch's bundled copy is hash-mangled and invisible to it, so without thiscuda_is_available()is FALSE on a GPU node. This is the minimum that makes R torch GPU work, and it is how rocker's retired CUDA images worked (system runtime vialdconfig; see rocker-org/ml). WITH_CUDA=1adds the fuller runtime (cuBLAS/cuFFT/… viaCUDA_RUNTIME_PACKAGES) for packages that dlopen system versions beyond cudart. Off by default.- Not yet covered by a single image: Python TensorFlow/keras (needs a Python
GPU env), GPU-accelerated BLAS (NVBLAS), RAPIDS/cuML. GPU roadmap:
#14.
nvidia-cuda-dev(4.5 GB of headers) was removed in v1.2.0.
- The image does ship system
- GDAL, PROJ, GEOS
- Spatial data libraries
- PostgreSQL, MySQL clients
- SQLite support
See the Dockerfile for the complete list of installed packages.
Images are built for linux/amd64 (Intel/AMD 64-bit).
Docker automatically uses emulation (Rosetta) to run AMD64 images on ARM64 hosts:
- Performance is excellent for most R/RStudio workloads
- Docker Desktop handles emulation transparently
- The
docker-compose.ymlconfiguration automatically specifies the correct platform - No manual configuration needed for Apple Silicon Macs
These images are designed primarily for server deployments where consistency and identical behavior across all environments is critical. Building for a single architecture ensures:
- Identical package versions and behavior everywhere
- No architecture-specific bugs or differences
- Simplified maintenance and testing
- Faster CI/CD build times (~2-3x improvement)
For users who need native ARM64 performance for local development, we may provide optimized ARM64 builds in the future. The current AMD64 images work well via emulation for most use cases.
- R Version Tags:
rstudio:4.3,rstudio:4.4,rstudio:4.5,rstudio:4.6- Always point to the latest build for each R major version - Latest Tag:
rstudio:latest- Always points to the highest R version (currently 4.6) - Release Tags: For each GitHub release
vX.Y.Z, creates versioned snapshots likerstudio:v1.0.0-r4.6 - Uses latest available rocker/rstudio tags for each major R version
- RStudio Server: Always upgraded to the latest stable Posit release at build time (rocker bases pin old RStudio versions for older R versions)
- Release tags preserve build history for reproducible deployments
Images are AMD64 and run via emulation on Apple Silicon:
- Docker Desktop handles emulation automatically via Rosetta
- Performance is excellent for R/RStudio workloads (typically <10% overhead)
- Use
docker-compose up- platform is pre-configured in docker-compose.yml - First launch may take slightly longer as emulation initializes
- If you experience issues, ensure Rosetta emulation is enabled in Docker Desktop settings (Preferences → Features in Development → Use Rosetta for x86/amd64 emulation)
If port 8787 is already in use:
# Use a different port
docker run -d -p 8888:8787 -e PASSWORD=rstudio zatzmanm/rstudio:latest
# Access at http://localhost:8888Ensure the work and data directories exist and have proper permissions:
mkdir -p work data
chmod 755 work dataCheck logs:
docker-compose logs
# or
docker logs rstudio-dev- Fork the repository
- Create a feature branch
- Make your changes
- Run linters:
make lint - Build locally:
make build - Submit a pull request
- Follow Dockerfile best practices
- Use
shellcheckfor shell scripts - Test changes with all R versions (4.3, 4.4, 4.5, 4.6)
- Update CHANGELOG.md for notable changes
To add support for a new R version:
- Update the matrix in
.github/workflows/build_push.yaml - Update the matrix in
.github/workflows/pr-validation.yaml - Update README.md documentation
- Update the "latest" tag logic if it's the new highest version
Images are automatically built and pushed to Docker Hub and GitHub Container Registry:
- On GitHub releases (all R versions)
- On manual workflow dispatch
- On a monthly schedule, so the rolling tags (
4.3–4.6,latest) pick up new RStudio Server, Quarto, and R patch releases automatically
The CI resolves the current stable RStudio Server version and passes it as a build argument, so a new Posit release invalidates the build cache and gets picked up on the next build.
Dependabot keeps the GitHub Actions versions up to date.
Pull requests trigger:
- Dockerfile linting (hadolint)
- Shell script linting (shellcheck)
- Test builds for all R versions (4.3, 4.4, 4.5, 4.6)
See repository license file.
Built on top of the excellent Rocker Project images.
For issues and questions:
- GitHub Issues: https://github.com/mjz1/rstudio-img/issues
- Docker Hub: https://hub.docker.com/r/zatzmanm/rstudio
- GitHub Container Registry: https://github.com/mjz1/rstudio-img/pkgs/container/rstudio-img