Add docker-compose and build from ruby docker base

This commit is contained in:
themetric
2016-07-03 20:17:29 -07:00
parent 32437dd899
commit 698af7456e
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"