diff --git a/packages/server/Dockerfile b/packages/server/Dockerfile index bd27ca0eeb..bf9138db86 100644 --- a/packages/server/Dockerfile +++ b/packages/server/Dockerfile @@ -27,9 +27,9 @@ COPY scripts/integrations/oracle/ scripts/integrations/oracle/ RUN /bin/bash -e scripts/integrations/oracle/instantclient/linux/x86-64/install.sh COPY package.json . -RUN yarn \ - && yarn cache clean -RUN apt-get remove -y --purge --auto-remove g++ make python \ +RUN yarn +# Remove unneeded data from file system to reduce image size +RUN yarn cache clean && apt-get remove -y --purge --auto-remove g++ make python \ && rm -rf /tmp/* /root/.node-gyp /usr/local/lib/node_modules/npm/node_modules/node-gyp COPY dist/ dist/ diff --git a/packages/worker/Dockerfile b/packages/worker/Dockerfile index 8c03a64998..16fde4edc1 100644 --- a/packages/worker/Dockerfile +++ b/packages/worker/Dockerfile @@ -14,6 +14,7 @@ RUN yarn global add pm2 COPY dist/package.json . RUN yarn +# Remove unneeded data from file system to reduce image size RUN apk del .gyp \ && yarn cache clean