shlogg · Early preview
Sinaptia @sinaptia_dev

Dockerizing A Ruby On Rails App With Docker And Docker-Compose

Dockerizing a Ruby on Rails app: create a Dockerfile, define database with docker-compose, set config/database.yml & .dockerignore files. Build & run containers with `docker-compose up --build`.

The last episode was about motivation and the benefits of using docker for development. In this episode, we’ll dockerize a Ruby on Rails app.
Before we start:
You must be familiar with docker (as mentioned in the last episode) and docker-compose.
We know there are tons of “Dockerizing X” tutorials/blog posts out there. It’s not the goal of this post to present you the absolute tutorial/blog post, but to show you the problems we encountered while taking our first steps using docker, and how to solve them (as those aren’t easily googleable).
Step 1: Create a Dockerfile
As you know, the first ste...