Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. FROM ubuntu:16.04
  2. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y dist-upgrade && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install unzip
  3. RUN DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install software-properties-common
  4. RUN add-apt-repository ppa:openjdk-r/ppa && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install openjdk-7-jdk
  5. RUN mkdir -p /opt/torquebox /home/torquebox/oadr
  6. ADD deps/torquebox-dist-3.0.2-bin.tar.gz /opt/torquebox
  7. RUN useradd --no-create-home --shell /bin/bash --home-dir /home/torquebox torquebox
  8. COPY app /home/torquebox/oadr/app/
  9. COPY config /home/torquebox/oadr/config/
  10. COPY db /home/torquebox/oadr/db/
  11. COPY lib /home/torquebox/oadr/lib/
  12. COPY public /home/torquebox/oadr/public/
  13. COPY spec /home/torquebox/oadr/spec/
  14. COPY test /home/torquebox/oadr/test/
  15. COPY vendor /home/torquebox/oadr/vendor/
  16. COPY config.ru Gemfile Gemfile.lock Rakefile /home/torquebox/oadr/
  17. RUN sed -i "s|https://rubygems.org|http://rubygems.org|" /home/torquebox/oadr/Gemfile
  18. RUN chown -R torquebox:torquebox /opt/torquebox /home/torquebox && ln -s /opt/torquebox/torquebox-3.0.2 /opt/torquebox/current
  19. USER torquebox
  20. WORKDIR /home/torquebox/oadr
  21. ENV TORQUEBOX_HOME=/opt/torquebox/current
  22. ENV JBOSS_HOME=${TORQUEBOX_HOME}/jboss JRUBY_HOME=${TORQUEBOX_HOME}/jruby
  23. ENV PATH=${JBOSS_HOME}/bin:${JRUBY_HOME}/bin:$PATH
  24. ENV RAILS_ENV=production
  25. RUN bundle install
  26. RUN rake assets:precompile
  27. COPY docker-entrypoint.sh docker-run.sh docker-initdb.sh /
  28. ENTRYPOINT ["/docker-entrypoint.sh"]
  29. CMD ["run"]