Reputation: 12514
I work on a project built on ROR. This projects has dependent gems and packages such as Fog
, rmagick
, sidekiq
, elasticsearch
, carrierwave
, imagemagic
, engineyard
, ruby
, rails
, etc.
Problems we faced:
Frequently laptops of my fellow developers crash. It takes the whole working-day to install all the dependent gems and packages in linux Ubuntu 14.04 / 15.04
.
rails s
?Upvotes: 2
Views: 164
Reputation: 7303
Is it possible to build everything I mentioned above inside a docker image and distribute among the developers?
Yes! I'm running a couple of Rails applications in Docker containers. Apart from Mark O'Connor's link I suggest you check out:
This is a demo app I created show how to develop and deploy a moderately complex application with docker.
Or (more advanced)
These are examples of how you can build a Rails image. As far as distributing goes: You'll probably have to setup your own Docker Registry or in case you don't mind having the images in out in the open push it to the docker.io registry.
Can we run rails like rails s?
Yes you can think of a docker container as an execution environment for your rails application. All your typical commands can be run.
Upvotes: 1
Reputation: 77931
I suggest checking out the official rails image from Docker
https://registry.hub.docker.com/_/rails/
This will still download dependencies but you could adapt it to build a base container that already includes the dependencies.
Upvotes: 1