Péter Sólymos Profile picture
Jul 8 8 tweets 6 min read
Rmarkdown is a reproducible authoring format in #rstats supporting dozens of static and dynamic output formats.

Let's review why and how you should containerize Rmd files!
Runtime: shiny - Add this to the document’s YAML header.

Now you can add Shiny widgets and #Shiny render functions to the file’s #rstats code chunks.

Use rmarkdown::run() as CMD in your Dockerfile
Runtime: shinyrmd - The doc is pre-rendered before deployment so that the HTML loads faster.

Add a rmarkdown::render() step in the Dockerfile
Notice that I am using the eddelbuettel/r2u based image by @eddelbuettel that brings previously unimaginable warp speed to the docker build process.

github.com/eddelbuettel/r…
@eddelbuettel Runtime: static - Render once and be done. Sinple.

Use the Nginx base image and COPY the locally rendered HTML.

Or use a multi-stage Docker build following @alexellisuk 's post (that inspired the official Docker docs): blog.alexellis.io/mutli-stage-do…
@eddelbuettel @alexellisuk What does this mean for #rmarkdown? You can use the Ubuntu based r2u image as a build environment, then inject the rendered HTML into the tiny Nginx image
@eddelbuettel @alexellisuk Read the whole post on the Hosting Data Apps website of you'd like to host #Rmarkdown docs with #Docker:

hosting.analythium.io/containerizing…
Want to learn about how to get your app in front of users?

I have a newsletter and tons of content for you. Continue expanding your knowledge base:

hosting.analythium.io

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Péter Sólymos

Péter Sólymos Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(