Skip to content

Conversation

@SteRiccio
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the RStudio infrastructure by modernizing Docker and AWS CLI installations and upgrading the RStudio Docker image base version. The changes improve installation reliability by using official Docker repositories and AWS CLI v2, while reorganizing R package dependencies for better maintainability.

Changes:

  • Updated Docker installation in EC2 UserData script to use official Docker CE packages from Docker's repository instead of Ubuntu's default packages
  • Upgraded AWS CLI installation to use AWS CLI v2 with proper installation method
  • Updated RStudio base image from rocker/rstudio:latest to rocker/rstudio:4.5.1 for version pinning
  • Reorganized and consolidated R package installations in Dockerfile, adding new packages (stringr, srvyr) and cleaning up duplicates

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
RStudioPoolService/src/domain/Instance/model.js Modernizes EC2 instance setup script with official Docker CE installation, AWS CLI v2, improved Docker configuration, and adds container restart policy
RStudioDocker/Dockerfile Pins base image version, reorganizes system and R package installations for better readability, adds new R packages, and includes cleanup commands

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

libgdal-dev \
libfontconfig1-dev \
libgit2-dev \
libglu1-mesa-dev \
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libglu1-mesa-dev package is installed twice - once on line 12 and again on line 23. Remove the duplicate installation to keep the Dockerfile clean and efficient.

Suggested change
libglu1-mesa-dev \

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +80
# add current user to "docker" group (to allow running docker without sudo)
sudo usermod -aG docker $USER
newgrp docker
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newgrp docker command won't work as expected in a UserData script because it starts a new shell session and doesn't affect the parent shell. In a non-interactive script context like UserData, this command will have no effect on subsequent commands. The group membership will only take effect after the user logs out and back in.

Since line 95 runs the docker command with sudo anyway, the group membership change isn't critical for this script. However, if the intention is to run docker commands without sudo, consider removing the newgrp docker line (as it's ineffective) and either keep using sudo for docker commands, or use sg docker -c "command" to run specific commands with the docker group.

Suggested change
# add current user to "docker" group (to allow running docker without sudo)
sudo usermod -aG docker $USER
newgrp docker
# add current user to "docker" group (to allow running docker without sudo in future logins)
sudo usermod -aG docker $USER

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants