Dockerfile 707 B

12345678910111213141516171819
  1. # docker build -t registry.melvans.com:5000/rottenpotatoes .
  2. # docker run --rm -p 8081:80 registry.melvans.com:5000/rottenpotatoes
  3. # docker stop rottenpotatoes && docker rm rottenpotatoes
  4. # docker run -d --name rottenpotatoes --network=basicserver_default --restart=always -e VIRTUAL_HOST=rottenpotatoes.melvans.com registry.melvans.com:5000/rottenpotatoes
  5. FROM ruby:2.3.3
  6. RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
  7. RUN mkdir /myapp
  8. WORKDIR /myapp
  9. ADD Gemfile /myapp/Gemfile
  10. ADD Gemfile.lock /myapp/Gemfile.lock
  11. RUN bundle install
  12. ADD . /myapp
  13. RUN bundle exec rake db:migrate
  14. RUN bundle exec rake db:seed
  15. EXPOSE 80
  16. CMD ["rails", "server", "-b", "0.0.0.0", "-p", "80"]