Starting a new Rails project using Docker
If you’ve been considering using and learning Docker for a while, I highly suggest to just do it. It is a great way to adhere to the 12 Factor App methodology. Docker is a method of containerization, this gives developers an easy way to develop in the exact same environment that your production system will be running. If you are just starting off with Docker, it can be a daunting experience, especially if you are use to building conventional Rails applications. Hopefully this blog post can get you started.
Before you can start any rails development, you’ll need a rails app. With Docker, you will first need to “bootstrap” your environment to gain access to the rails executable to initialize a new application. The following Dockerfile defines a new image to be built from
ruby:2.4.1 which is derived from a basic Debian image. In our example,
/app will be used as the directory
Continue reading →