Docker Ruby On Rails Development
Time to start building.
Docker ruby on rails development. And that s all there is to creating a rails development environment with the help of docker. This tutorial will show you how to set up a development environment for a ruby on rails application usi. Creating a rails image. We ll install rails on a docker container.
Since i use docker i decided to compile ruby from the source as there is no real need to use the version managers like rvm or rbenv. I was happy to deliver a talk on using docker for rails development. A dockerfile contains all the commands that you would need to install the. For that we ll need a dockerfile.
Next create a bootstrap gemfile which just loads rails. We re going to generate a new rails project without even needing ruby installed on our work station. Rails is an open source web application framework written in ruby. This post is a b side of my railsconf 2019 talk terraforming legacy rails applications today i am not going to convince you to switch to docker for application development though you can check the railsconf video for some arguments.
Ruby on rails container. We can do this by using the official ruby docker image. Now if you plan on building ruby on rails projects with dockerfiles you re ready. For more information on how to write dockerfiles see the docker user guide and the dockerfile reference.
The app ruby on rails container is based on linux ubuntu 18 0 4 bionic image to ensure that it would work equally the same way both in development and production. If you are actively developing an application using docker can simplify your workflow and the process of deploying your application to production. From 0 to fargate migrating your ruby on rails app to docker this is the second article in a series about migrating your production application stack to docker and aws fargate. It ll be overwritten in a moment by rails new.
My goal is to share the configuration i currently use for rails projects and which was born in production development at evil martians.