Code Monkey home page Code Monkey logo

docker-rails's Introduction

docker-rails

Version

Rails 4.1.7

Build from repository

(https://github.com/jllopis/docker-rails)

$ git clone [email protected]:jllopis/docker-rails.git
$ cd docker-rails
$ docker build t my_user/rails:latest

Start

This image is intended to be used as base image for Ruby+Rails based application containers.

It comes with Rails installed as well as some dependencies.

It does not define a CMD but it defines a default ENTRYPOINT which is a script ADDED from the Dockerfile directory.

If you want to start the image you can do

$ docker run -t -i --entrypoint /bin/bash rails:4.1.7 -l

How to use it

To build from it, you need in the same directory of this Dockerfile the following:

  • . directory which contains your rails application (ex: git clone [email protected]:observer.git && cd observer). This directory will be added to the image in /opt/app
  • run.sh which is a shell script that will run on container start and thus will run your app and its dependencies.

Also, you should also EXPOSE the ports needed or specify them when the docker run command.

A minimal run.sh script:

#!/usr/bin/env bash
# By: Joan Llopis <[email protected]>

cd $RAILS_APP_ROOT
bundle install

echo "Starting app..."
rails s

docker-rails's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

praveen-ms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.