forked from openshift/ruby-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift#29 from mfojtik/fix_dockerbuild
Fix the Docker build
- Loading branch information
Showing
1 changed file
with
5 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |