rack-unicorn.dockerfile 544 B

123456789101112131415161718192021222324
  1. FROM ruby:3.4-rc
  2. ENV RUBY_YJIT_ENABLE=1
  3. # Use Jemalloc
  4. RUN apt-get update && \
  5. apt-get install -y --no-install-recommends libjemalloc2
  6. ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
  7. WORKDIR /rack
  8. COPY Gemfile ./
  9. ENV BUNDLE_FORCE_RUBY_PLATFORM=true
  10. RUN bundle config set without 'development test'
  11. RUN bundle install --jobs=8
  12. COPY . .
  13. EXPOSE 8080
  14. #CMD nginx -c /rack/config/nginx.conf && bundle exec unicorn -E production -c config/unicorn.rb
  15. CMD bundle exec unicorn -c config/unicorn.rb -o 0.0.0.0 -p 8080 -E production