From e30359860947a654ee5cc8a038158a799b9dae6b Mon Sep 17 00:00:00 2001 From: firelemons Date: Wed, 14 Aug 2024 09:29:03 -0500 Subject: [PATCH] balance yarn and bundle installs --- Dockerfile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b253c04d3..9c2dd50ffd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,24 +3,16 @@ FROM ruby:3.2.2-alpine AS builder RUN apk update && apk upgrade && apk add --update --no-cache \ build-base \ curl-dev \ - nodejs \ postgresql-dev \ - tzdata \ - vim \ - yarn && rm -rf /var/cache/apk/* + tzdata +# rm -rf /var/cache/apk/* ARG RAILS_ROOT=/usr/src/app/ WORKDIR $RAILS_ROOT -COPY package*.json yarn.lock $RAILS_ROOT -RUN yarn install --check-files - COPY Gemfile* $RAILS_ROOT RUN bundle install -COPY . . -RUN yarn build && yarn build:css - ### BUILD STEP DONE ### FROM ruby:3.2.2-alpine @@ -38,7 +30,11 @@ RUN apk update && apk upgrade && apk add --update --no-cache \ WORKDIR $RAILS_ROOT -COPY --from=builder $RAILS_ROOT $RAILS_ROOT +COPY . . +RUN yarn install +RUN yarn build && yarn build:css + +# COPY --from=builder $RAILS_ROOT $RAILS_ROOT COPY --from=builder /usr/local/bundle/ /usr/local/bundle/ EXPOSE 3000