Extending to external platform(s)
We looked at how we can extend to some other external platforms such as cloud services like AWS, Microsoft Azure, and DigitalOcean before. In this section, we will focus on extending Docker to the Heroku platform. Heroku is more a little different than those cloud services; it is considered a Platform as a Service (PaaS). Instead of deploying containers to it, you can link your containers to the Heroku platform from which it is running a service, such as PHP, Java, Node.js, Python, or many others. So, you can run your rails application on Heroku and then attach your Docker container to that platform.
Heroku
The way you can use Docker and Heroku together is by creating your application on the Heroku platform. Then, in your code, you will have something similar to the following:
{ "name": "Application Name", "description": "Application to run code in a Docker container", "image": "<docker_image>:<tag>", "addons": [ "heroku-postgresql" ] ...