Project

rbdock

0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Generate Dockerfile for ruby or running rails/sinatra.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
~> 2.2
>= 0
>= 2.13
~> 0.8

Runtime

~> 2.7.0
~> 1.1.10
 Project Readme

rbdock

Gem Version

Generate Dockerfile for Ruby or Rails, Sinatra.

Dockerfile to prepare ruby is almost common, so generate its common parts. This is still experimetal and under heavy construction.

Installation

$ gem install rbdock

Usage

Create Dockerfile to build ruby

Create Dockerfile to build ruby 2.1.0 ready image.

$ rbdock 2.1.0

It generates this Dockerfile.

You can create Dockerfile to build multiple versions of ruby by rbenv or rvm.

$ rbdock 2.0.0-p353 1.9.3-p484 -i centos

It generates this Dockerfile.

Create Dockerfile for rails/sinatra application

For example, you can work with rails application developed on local environment.

$ rails new my_rails_app
$ rbdock 2.1.0 --app my_rails_app --rbenv
$ docker build -t tcnksm/rails_app .
$ docker run -i -p 3000:3000 -t tcnksm/rails_app 'rails server'

It generates this Dockerfile.

You can work with application hosted on remote repository. For example, this is my sinatra application hosted on github.

$ rbdock 2.0.0-p353 --app https://github.com/tcnksm/trying-space
$ docker build -t tcnksm/sinatra_app .
$ docker run -i -p 8080:8080 -t tcnksm/my_sinatra_app 'rackup -p 8080'

It generates this Dockerfile. Your application will be cloned to local directory (.rbdock_app) and ADD to docker image.

Options

Option Description
--image name Set base image. Now ubuntu or cenos is avalable. Default is ubuntu.
--rbenv Use rbenv to manage ruby installation
--rvm Use rvm to manage ruby installation
--app url Add Rails/Sinatra application. You can set local path or remote host
--list List all available ruby versions.

Contributing

  1. Fork it ( http://github.com//rbdock/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request