Search⌘ K
AI Features

How Do We Run Our Rails App?

Explore ways to run Rails apps in Docker containers, understand why basic images fall short, and learn how Dockerfiles help create preconfigured images. This lesson guides you through building efficient, repeatable container setups for Rails servers.

Ways to run our Rails app

Unfortunately, we cannot start a Rails server with just the ruby:2.7 image. Rails has a few more requirements like JavaScript interpreter (Node.js) to help with the asset pipeline and gem dependencies. One way is to run Bash inside a container based on the ruby:2.7 image, and install what we need from there. However, running the commands manually is not easily repeatable.

Another way to ...