Skip to content

Commit

Permalink
Merge pull request openshift#29 from mfojtik/fix_dockerbuild
Browse files Browse the repository at this point in the history
Fix the Docker build
  • Loading branch information
Michal Fojtik committed Mar 3, 2015
2 parents 547b8fc + 26a689f commit 3f15fb4
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
FROM openshift/ruby-20-centos7

RUN gem install sinatra sinatra-activerecord mysql2 --no-ri --no-rdoc

ADD . /tmp/
USER root
RUN chown -R ruby:ruby /tmp/*

USER ruby
WORKDIR /tmp/

ENV RACK_ENV production
ENV RAILS_ENV production
USER default

COPY . /opt/openshift/src/
RUN scl enable ror40 "bundle install"
ENV RACK_ENV="production",RAILS_ENV="production"
EXPOSE 8080
CMD ["ruby", "app.rb"]
CMD ["scl", "enable", "ror40", "./run.sh"]

0 comments on commit 3f15fb4

Please sign in to comment.