Skip to content

Building with Docker

Gary edited this page Jun 26, 2018 · 3 revisions

RStudio can build natively on an appropriately configured machine. However, official releases are now (or soon will be) built inside Docker containers. It's occasionally useful to be able to simulate this process using your local machine; for instance:

  • To build a platform for which you don't have a warm development configuration

  • To validate a change which only affects a platform other than your system's native operating system; for instance, an #ifdef that affects Linux when you're developing on macOS

  • To produce one-off release builds for use by QA, customers, etc. without the requirement to set up an entire development machine configured for the target platform

  • To validate the effect of non-code configuration changes

  • To double-check a fix for a build break prior to committing it

etc., etc.

In the build lab, the Docker containers are orchestrated by Jenkins, but on your own development machine, you can kick off builds manually. Inside the docker folder you'll find a script Run it as follows:


where IMAGE-NAME is the image you want to build (run with no arguments to get a list of valid images), and FLAVOR-NAME is the product you want to build (e.g. desktop or server). You can also optionally add a version to produce a build with a version label. So, for instance:

 ./docker-compile xenial-amd64 server 1.2.345

would produce an RStudio Server .deb installer from the Ubuntu Xenial container, and label it version 1.2.345.

This script has no prerequisites and takes care of all the Docker minutiae for you; it will build an image from the appropriate Dockerfile, configure RStudio, and compile it inside a container.

Windows Specifics (Work in Progress, not in master yet)

To build the Windows installer via Docker, you need:

  • Windows-10 Pro 64-bit or better
  • Hyper-V enabled
  • Docker for Windows, with Windows containers
  • use win-docker-compile.cmd with no arguments to start the build
You can’t perform that action at this time.