For that we ll need a dockerfile.
Docker ruby on rails.
A dockerfile contains all the commands that you would need to install the.
To build your ruby on rails docker container you will use the docker build command and provide a tag or a name for the container so you can reference it later when you want to run it.
Chandra shettigar who does an excellent tutorial on how to set up a ruby on rails app with docker but leaves the setup of docker to you and doesn t show you how to tear down rebuild or reconfigure.
Shrink the size of the resulting docker image to minimize the storage space we need as well as the time it takes to.
We ll install rails on a docker container.
This article shows how to optimize a docker image for a ruby on rails application both in terms of making the image as small as possible as well as how to improve the time it takes to create the image.
We have two main motivations for optimizating the image creation.
For the next part of this series where i will show you how to set up a react application within a docker.
We re going to generate a new rails project without even needing ruby installed on our work station.
The final part of the command tells docker which directory to build from.
Docker build t ror tutorial.