Reduce image size

This commit is contained in:
Adria Navarro 2023-06-22 11:37:33 +01:00
parent 55e38725db
commit a227a2664a
1 changed files with 3 additions and 3 deletions

View File

@ -38,9 +38,9 @@ RUN apt update && apt upgrade -y \
COPY package.json .
COPY dist/yarn.lock .
RUN yarn install --production=true
# Remove unneeded data from file system to reduce image size
RUN yarn cache clean && apt-get remove -y --purge --auto-remove g++ make python \
RUN yarn install --production=true \
# Remove unneeded data from file system to reduce image size
&& 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/