diff --git a/Dockerfile b/Dockerfile index 7226284..bc7b0be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,8 @@ WORKDIR /home/app/sutty # Copiamos solo el Gemfile para poder instalar las gemas necesarias COPY --chown=app:www-data ./Gemfile . COPY --chown=app:www-data ./Gemfile.lock . -RUN bundle install --no-cache --path=./vendor --without='test development' +RUN bundle config set no-cache 'true' +RUN bundle install --path=./vendor --without='test development' # Vaciar la caché RUN rm vendor/ruby/2.7.0/cache/*.gem @@ -58,7 +59,10 @@ COPY --chown=app:root ./config/credentials.yml.enc ./config/ COPY --chown=app:www-data ./public/assets-production ./public/assets COPY --chown=app:www-data ./public/packs-production ./public/packs -# Limpieza +# Eliminar la necesidad de un runtime JS en producción, porque los +# assets ya están pre-compilados. +RUN sed -re "/(sassc|uglifier|bootstrap|coffee-rails)/d" -i Gemfile +RUN bundle clean RUN rm -rf ./node_modules ./tmp/cache ./.git # Contenedor final