From 8093c49a0fadf8ef3e16c1570fdd24da53be65bb Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 27 Jun 2024 14:30:20 -0400 Subject: update dockerfile --- rails-backend/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rails-backend/Dockerfile b/rails-backend/Dockerfile index e68d5a7..0e9ee16 100644 --- a/rails-backend/Dockerfile +++ b/rails-backend/Dockerfile @@ -14,7 +14,6 @@ ENV RAILS_ENV="production" \ BUNDLE_PATH="/usr/local/bundle" \ BUNDLE_WITHOUT="development" - # Throw-away build stage to reduce size of final image FROM base as build @@ -24,13 +23,13 @@ FROM base as build RUN apk add --update --no-cache build-base git vips postgresql-libs postgresql-dev tzdata # Install application gems -COPY Gemfile Gemfile.lock ./ +COPY rails-backend/Gemfile rails-backend/Gemfile.lock . RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ - bundle exec bootsnap precompile --gemfile && echo BLAAAAHHHH + bundle exec bootsnap precompile --gemfile # Copy application code -COPY . . +COPY ./rails-backend . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ -- cgit v1.2.3