How Do We Run Our Rails App?
Unfortunately, we can’t start a Rails server with just the ruby:2.6 image—Rails has a few more requirements. For example, we’re going to need a JavaScript interpreter (like Node.js) to help with the asset pipeline, plus we’ll need to install our gem dependencies. How do we run a Rails server in a container while making sure that these requirements are satisfied?
There are a few approaches we could take. We could do what we did in the previous chapter: run bash inside a container based on the ruby:2.6 image, and install what we need from there. However, running the commands manually is not easily repeatable. We want a reliable, repeatable way of spinning up Rails servers left, right, and center. Having to run various ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access