Advertisement
Guest User

Untitled

a guest
Jun 29th, 2020
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. FROM ruby:2.3
  2. MAINTAINER marko@codeship.com
  3. # Install apt based dependencies required to run Rails as
  4. # well as RubyGems. As the Ruby image itself is based on a
  5. # Debian image, we use apt-get to install those.
  6. RUN apt-get update && apt-get install -y \
  7. build-essential \
  8. nodejs
  9. # Configure the main working directory. This is the base
  10. # directory used in any further RUN, COPY, and ENTRYPOINT
  11. # commands.
  12. RUN mkdir -p /app
  13. WORKDIR /app
  14. # Copy the Gemfile as well as the Gemfile.lock and install
  15. # the RubyGems. This is a separate step so the dependencies
  16. # will be cached unless changes to one of those two files
  17. # are made.
  18. COPY Gemfile Gemfile.lock ./
  19. RUN gem install bundler -v 1.17.3 && bundle install --jobs 20 --retry 5
  20. # Copy the main application.
  21. COPY . ./
  22. # Expose port 3000 to the Docker host, so we can access it
  23. # from the outside.
  24. EXPOSE 3000
  25.  
  26. # Configure an entry point, so we don't need to specify
  27. # "bundle exec" for each of our commands.
  28. ENTRYPOINT ["bundle", "exec"]
  29. # The main command to run when the container starts. Also
  30. # tell the Rails dev server to bind to all interfaces by
  31. # default.
  32. CMD ["rails", "server", "-b", "0.0.0.0"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement