R Shiny¶
This guide provides instructions on how to build a Docker image for an R Shiny application, push it to the Geddes Registry and deploy it on Geddes.
Create an R Shiny Docker Image¶
Create a local Dockerfile by saving the following Dockerfile to your computer and editing the contents for your R Shiny App.
Docker Build and Testing Process¶
Build the Docker image locally based on the Dockerfile above. The Dockerfile must be in your current working directory. This command tags the image with the name "myshinyapp" and version 1.0.
Test your application locally. This command will run your container locally and expose the R Shiny port (3838) so it can be accessed via http://localhost:3838 in your web browser.
On Linux or Mac: docker run --network=host myshinyapp:1.0
On Windows: docker run -p 3838:3838 myshinyapp:1.0
Iterate on code changes locally until you want to deploy on Geddes.
Tag and Upload to the Geddes Registry¶
Tag the image for upload to the Geddes Registry.
Push the image to the Geddes Registry. Run the login command using your Purdue career account username and password if you currently are not authenticated to the registry.
Deploy the Application on Geddes¶
To deploy the application, one can follow the instructions for deploying a web server and replace the image name with the Geddes registry image tag from above: geddes-registry.rcac.purdue.edu/<repo>/myshinyapp:1.0