Merge pull request #248 from themetric/feature/docker-compose

Add docker-compose and build from ruby docker base
This commit is contained in:
Ken Johnson
2016-07-04 10:16:14 -04:00
committed by GitHub
2 changed files with 17 additions and 11 deletions
+8 -11
View File
@@ -1,12 +1,9 @@
FROM rails:onbuild
MAINTAINER owasp
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
ADD . /myapp
ADD script/start /start
RUN chmod a+x /start
user root
ENV RAILS_ENV development
CMD /start
+9
View File
@@ -0,0 +1,9 @@
version: '2'
services:
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/myapp
ports:
- "3000:3000"