Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rstudio-server to r image as rstudio image #164

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

remlapmot
Copy link

@remlapmot remlapmot commented Sep 25, 2024

This adds rstudio-server to the r image, as a new rstudio image.

Build with

just build-rstudio

Then until rstudio image published in ghcr.io/opensafely-core retag as

docker tag rstudio ghcr.io/opensafely-core/rstudio:latest

Is used by the new opensafely rstudio subcommand in opensafely-core/opensafely-cli#272.

To launch, from an OpenSAFELY research repo run opensafely rstudio

Dockerfile Outdated Show resolved Hide resolved
rstudio-dependencies.txt Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
rstudio-entrypoint.sh Outdated Show resolved Hide resolved
rstudio-entrypoint.sh Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@remlapmot remlapmot force-pushed the investigate-rstudio-server-iteration-3-root-squashed branch 3 times, most recently from ba453e7 to c8265c9 Compare October 4, 2024 09:05
@remlapmot
Copy link
Author

As suggested I have also added a test, which checks for a 200 response from the localhost port. (Nb. the test uses the rstudio image, rather than ghcr.io/opensafely-core/rstudio:latest image, as I assume the flow is build, test, publish). Run the test with

just test-rstudio

@remlapmot remlapmot force-pushed the investigate-rstudio-server-iteration-3-root-squashed branch 3 times, most recently from cc723e1 to 9a84b47 Compare October 4, 2024 10:28
@remlapmot remlapmot marked this pull request as ready for review October 8, 2024 10:12
@remlapmot remlapmot force-pushed the investigate-rstudio-server-iteration-3-root-squashed branch from 9a84b47 to 5083d15 Compare October 8, 2024 10:56
@remlapmot
Copy link
Author

I have added the trap line to the test (test-rstudio.sh).

@remlapmot remlapmot force-pushed the investigate-rstudio-server-iteration-3-root-squashed branch from 5083d15 to 503efc7 Compare October 10, 2024 10:22
@remlapmot remlapmot force-pushed the investigate-rstudio-server-iteration-3-root-squashed branch from 503efc7 to 97f8d9c Compare October 14, 2024 10:11
This is a bit cleaner and easier.

Also tweak the Dockerfile to create the user with group/dir in one step,
remove some uneeded bits, and give up on logs.
This uses process substitution to tail the log file and direct it to
stdout.
@remlapmot remlapmot force-pushed the investigate-rstudio-server-iteration-3-root-squashed branch from c4cc77f to 98c6beb Compare October 16, 2024 10:11
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