diff --git a/docker/Dockerfile b/docker/Dockerfile index ad41be490a..2bc484ecfa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index b7674f2762..bc492f3958 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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 ${@}