Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tweaks in Dockerfile #2495

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
ARG RUBY_VERSION
FROM ruby:$RUBY_VERSION-alpine
ARG RUBY_VERSION=3
FROM ruby:${RUBY_VERSION}-alpine

ENV BUNDLE_PATH /usr/local/bundle/gems
ENV LIB_PATH /var/grape
ENV RUBYOPT --enable-frozen-string-literal --yjit
ENV LD_PRELOAD libjemalloc.so.2
ENV MALLOC_CONF dirty_decay_ms:1000,narenas:2,background_thread:true

RUN apk add --update --no-cache make gcc git libc-dev gcompat && \
RUN apk add --update --no-cache make gcc git libc-dev gcompat jemalloc && \
gem update --system && gem install bundler

WORKDIR $LIB_PATH
Expand Down
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ else
fi

# Keep gems in the latest possible state
(bundle check || bundle install) && bundle update && bundle exec ${@}
(bundle check || bundle install) && bundle update && exec bundle exec ${@}