FROM registry.access.redhat.com/rhel:7.5 LABEL io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \ io.s2i.scripts-url="image:///usr/libexec/s2i" RUN yum-config-manager --enable rhel-server-rhscl-7-rpms && \ INSTALL_PKGS="rh-ruby25 rh-ruby25-ruby-devel rh-ruby25-rubygem-rake rh-ruby25-rubygem-bundler libxml2-devel sqlite-devel git" && \ yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && rpm -V $INSTALL_PKGS && \ yum -y update && \ yum clean all -y RUN rm -rf /var/cache/yum RUN source scl_source enable rh-ruby25 && \ gem update --verbose --system --no-document --clear-sources RUN mkdir -p /usr/libexec/s2i COPY s2i/assemble s2i/run /usr/libexec/s2i/ RUN chmod 777 /usr/libexec/s2i/{assemble,run} ENV RAILS_ENV=production RUN useradd -u 1001 -g 0 -M -d /workshopper workshopper RUN mkdir -p /workshopper && chown workshopper:root /workshopper RUN chmod 777 /workshopper WORKDIR /workshopper COPY Gemfile Gemfile.lock ./ RUN chown -R workshopper:root Gemfile Gemfile.lock USER workshopper RUN source scl_source enable rh-ruby25 && \ bundle install --deployment #ADD --chown=workshopper:root . . #COPY . . # RUN chown -R workshopper:root . RUN source scl_source enable rh-ruby25 && \ bundle exec rake assets:precompile RUN rm -rf tmp log && mkdir -p tmp log && chmod -R 0777 tmp log ENV HOME=/workshopper EXPOSE 8080 CMD ./boot.sh