Developing locally using Docker
Last updated
Last updated
Using Docker to run your R Shiny app locally will produce a running instance of your application which mirrors Heroku 1:1. While testing your application within RStudio should work in most cases, running your application with Docker can provide additional verification for any code changes you've made.
Haven't yet installed Docker? Read before continuing.
All the following exercises use as the example application. To test your own application, substitute heroku-docker-r-example-app
with your own application checkout or directory.
The following command will compile your application into a docker image tagged with the name my-local-heroku-docker-r-example-app. You will see the same build output as you would if you pushed your code to the git Heroku remote.
Once completed, you can run the docker image you produced:
This will run your Shiny application on port 8080. You may need to click Allow on any security-related popups, common to Windows and Mac OS X, which ask whether you want to allow Docker to bind to port 8080.
If you're already using port 8080 or want to use a different port, substitute 8080 throughout the entire command with a different port number, except for ports 12000 to 13000 which are reserved for R threads within the container.
Go to and you should see your application.