diff --git a/components/services/Dockerfile b/components/services/Dockerfile index 83b8918ad..478876681 100644 --- a/components/services/Dockerfile +++ b/components/services/Dockerfile @@ -5,8 +5,6 @@ FROM public.ecr.aws/lambda/ruby:$RUBY_VERSION AS build-image RUN dnf update && \ dnf -y install postgresql-devel openssl-devel gcc make -RUN gem install bundler - ARG FUNCTION_DIR RUN mkdir -p ${FUNCTION_DIR} COPY Gemfile Gemfile.lock ${FUNCTION_DIR}/ @@ -14,11 +12,11 @@ WORKDIR ${FUNCTION_DIR} ENV BUNDLE_APP_CONFIG="${FUNCTION_DIR}/.bundle" -RUN bundle config --local deployment true && \ +RUN gem install bundler && \ + bundle config --local deployment true && \ bundle config --local path "vendor/bundle" && \ - bundle config --local without 'development test' - -RUN bundle install --jobs 20 --retry 5 + bundle config --local without 'development test' && \ + bundle install RUN rm -rf vendor/bundle/ruby/*/cache/ && find vendor/ -name "*.o" -delete && find vendor/ -name "*.c" diff --git a/components/services/config/application.rb b/components/services/config/application.rb index d442dfc79..632f767d5 100644 --- a/components/services/config/application.rb +++ b/components/services/config/application.rb @@ -1,3 +1,6 @@ +require "bundler" +Bundler.require + require_relative "app_settings" require_relative "initializers/aws_stubs"