Skip to content

Add Dockerfile.positron for SSH-based Positron workflows - #51

Closed
seandavi with Copilot wants to merge 2 commits into
develfrom
copilot/create-dockerfile-positron
Closed

Add Dockerfile.positron for SSH-based Positron workflows#51
seandavi with Copilot wants to merge 2 commits into
develfrom
copilot/create-dockerfile-positron

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This adds a Positron-oriented container path without changing the existing RStudio-based image. The new variant keeps the current Bioconductor workshop build behavior, but swaps the runtime entrypoint to sshd so a local Positron client can attach over Remote SSH.

  • New alternative image

    • Adds Dockerfile.positron alongside the existing Dockerfile
    • Reuses bioconductor/bioconductor_docker:devel
    • Installs openssh-server
    • Exposes port 22 and starts sshd in the foreground
    • Uses the existing rstudio user and PASSWORD env var for login
  • Build/install behavior

    • Keeps the repo copy/install flow under /home/rstudio
    • Installs the workshop package during image build
    • Vendors BiocGenerics/Biobase into the active site library to avoid relying on the runtime RStudio entrypoint or an extra BiocManager bootstrap step
  • Docs and packaging

    • Documents the Positron path in README.md
    • Adds a brief note to vignettes/HOWTO_BUILD_WORKSHOP.Rmd
    • Excludes Dockerfile.positron from the R package build via .Rbuildignore
docker build -f Dockerfile.positron -t buildabiocworkshop-positron .
export PASSWORD='choose-a-password'
docker run --rm --env PASSWORD -p 2222:22 buildabiocworkshop-positron
# Then connect from Positron to ssh://rstudio@localhost:2222

Copilot AI changed the title [WIP] Add alternative Dockerfile based on Positron Add Dockerfile.positron for SSH-based Positron workflows Jul 9, 2026
Copilot AI requested a review from seandavi July 9, 2026 12:55

@seandavi seandavi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there not a way to run positron in the browser directly? Positron server or something like that?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an alternative container build path intended for Positron workflows by introducing a new SSH-based Dockerfile variant, while keeping the existing RStudio-based image and the repository’s workshop-build flow intact.

Changes:

  • Added Dockerfile.positron that starts sshd (port 22) for Remote SSH-based Positron connections.
  • Documented the Positron/SSH workflow in README.md and vignettes/HOWTO_BUILD_WORKSHOP.Rmd.
  • Excluded Dockerfile.positron from the R package build via .Rbuildignore.

Reviewed changes

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

File Description
vignettes/HOWTO_BUILD_WORKSHOP.Rmd Documents the new Positron/SSH container option alongside the existing GitHub Actions workflow guidance.
README.md Adds usage instructions for building/running the Positron/SSH image variant.
Dockerfile.positron Introduces a new SSH-based container entrypoint intended for Positron Remote SSH workflows.
.Rbuildignore Ensures Dockerfile.positron is excluded from the R package build artifacts.

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

Comment thread Dockerfile.positron

COPY --chown=rstudio:rstudio . /home/rstudio/

RUN Rscript -e "options(repos = c(CRAN = 'https://cran.r-project.org')); devtools::install('.', dependencies=FALSE, build_vignettes=TRUE, upgrade=FALSE)"
Comment thread Dockerfile.positron

EXPOSE 22

CMD ["/bin/bash", "-lc", "set -euo pipefail; : \"${PASSWORD:?Set PASSWORD to enable SSH login}\"; echo \"rstudio:${PASSWORD}\" | chpasswd; ssh-keygen -A >/dev/null 2>&1; exec /usr/sbin/sshd -D -e"]
Comment thread README.md
```sh
docker build -f Dockerfile.positron -t buildabiocworkshop-positron .
export PASSWORD='choose-a-password'
docker run --rm --env PASSWORD -p 2222:22 buildabiocworkshop-positron
Comment on lines +75 to +77
You do not need to create a docker image manually. Github actions will read `Dockerfile` located in this template, and using the yaml files will create, build and push to the Github Container Registry an image with the name (default) `ghcr.io/yourgithubuser/yourgithubreponame`, all lowercase.

If you want a Positron-oriented alternative, this template also ships with `Dockerfile.positron`. Build that variant explicitly with `docker build -f Dockerfile.positron .`; it starts `sshd` so that a locally installed Positron client can attach with Remote SSH instead of using RStudio Server in the browser.
@seandavi seandavi closed this Jul 9, 2026
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.

Create alternative docker based on positron rather than rstudio.

3 participants