Docker4Ruby 0.1.0 for local development

Chingis
Wodby blog
Published in
2 min readSep 28, 2018

--

Following the success of existing Docker4X projects we decided to compile a stack for Ruby developers and now we’re happy to introduce Docker4Ruby. It’s almost the same set of managed images to spin up a local environment with docker-compose. You can find a quick start guide in our documentation or by using a short alias wodby.com/docker4ruby.

The main difference from PHP image we faced with is that Ruby packages (gems) often come with so-called native extensions that require compilation and, hence, requires a set of dev packages of libraries and other build tools. In PHP those things are separated to Pecl extensions and composer packages. At first, we thought we could pre-compile those gems that have native extensions, so when you run bundle install it will use cached gems but that was pointless because gems versions often differ greatly from a project to project. In the end, we decided to add a -dev version of Ruby image with all dev packages required to build gems with native extensions, so when you deploy your Ruby app for the first time with our docker-compose it will build the Ruby image with gems from your Gemfile.lock . If you miss some of dev packages you can update Dockerfile that we provide and which used for the initial build. Once the image is built it will be used to start up your application server (Unicorn, Puma or something else to your choice) with a bind mount to your codebase from the host.

Ruby stack on Wodby is coming soon! Subscribe to our newsletter to get notified.

--

--