From 373908a52fed4e73975480cec1a941d274842ae9 Mon Sep 17 00:00:00 2001 From: Chirag-Bhatti Date: Wed, 2 Aug 2023 14:43:04 +0100 Subject: [PATCH] CLDC-2531: update Dockerfile to no longer remove files as it's redundant --- Dockerfile | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index f47700cc7..a4c78106e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,32 +58,12 @@ FROM base as staging RUN bundle config set without "development" RUN bundle install --jobs=4 --no-binstubs --no-cache -# Cleanup to reduce image size -RUN rm -rf node_modules && \ - rm -rf /usr/local/bundle/cache && \ - find /usr/local/bundle/gems -name "*.c" -delete && \ - find /usr/local/bundle/gems -name "*.h" -delete && \ - find /usr/local/bundle/gems -name "*.o" -delete && \ - find /usr/local/bundle/gems -name "*.html" -delete && \ - rm -rf .env && \ - rm -rf app/frontend - USER nonroot CMD bundle exec rails s -e ${RAILS_ENV} -p ${PORT} --binding=0.0.0.0 FROM base as production -# Cleanup to reduce image size -RUN rm -rf node_modules && \ - rm -rf /usr/local/bundle/cache && \ - find /usr/local/bundle/gems -name "*.c" -delete && \ - find /usr/local/bundle/gems -name "*.h" -delete && \ - find /usr/local/bundle/gems -name "*.o" -delete && \ - find /usr/local/bundle/gems -name "*.html" -delete && \ - rm -rf .env && \ - rm -rf app/frontend - USER nonroot CMD bundle exec rails s -e ${RAILS_ENV} -p ${PORT} --binding=0.0.0.0