Search⌘ K

Production-Like Environment

Explore how to simulate a production environment for your Rails app using Docker Machine and VirtualBox. Understand creating virtual instances, deploying your app, and scaling it with multiple containers. Gain practical skills in managing Docker infrastructure locally to prepare for cloud deployment.

What to expect in this chapter?

We are so close to deployment to production. In the previous chapter, we configured our application so it is ready to run in production environments. We also pushed our image to Docker Hub.

However, before setting up cloud-based infrastructure and deploying it, having a practice run locally is a good option. In this chapter, we will discuss virtualization technologies, specifically VirtualBox, to create a virtual infrastructure that can simulate a production environment.

We will learn how to

  • create a single node cluster, capable of running Docker containers;
  • deploy the application;
  • scale up the app and run multiple copies of it on a single instance.

In the process, we will also learn more about the additional tools Docker ...