Closing Thoughts on Docker in Development

Let’s take a moment to reflect on what we have achieved using Docker for development purposes.

We'll cover the following

Highlights

As we draw to the close of this section on development, let’s take a moment to reflect on what we have achieved. At first glance, it is easy to mistakenly think we have gone through a fair amount of effort only to arrive back where we started: with a standard, working Rails app.

In fact, though, we have achieved some major benefits:

  • Our Dockerfile and docker-compose.yml file give us a declarative description of our entire application—with all its required parts, such as the database—helping to give a clear picture of what makes up the application.

  • We can spin up the entire application with a single command, even with nothing previously installed. Docker downloads and installs what we need.

  • We have eliminated the need to manually install our app’s main software dependencies on our local machine. No more fiddling with getting Redis, Postgres, or even Ruby installed and running on compatible versions across the whole team. Docker is taking care of all of this for us.

  • Our app can run on any machine with Docker installed. It gives us freedom and portability.

  • Upgrading parts of our application is as simple as updating the version number of the image we refer to in our Compose file. It is a breeze to see how our app works on a newer version of Ruby, for example.

For all these reasons, using Docker in development is useful in and of itself. You should feel proud to have reached this milestone. However, the journey does not stop here. Docker can bring even more benefits, as we will see in subsequent chapters.

Get hands-on with 1200+ tech skills courses.