mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(Dockerfile) decrease image size: clean npm cache after install
This commit is contained in:
parent
dbd09e5f32
commit
99d8487b29
2 changed files with 3 additions and 1 deletions
|
|
@ -7,7 +7,8 @@ WORKDIR /usr/src/app
|
|||
COPY package.json /usr/src/app/
|
||||
|
||||
RUN npm install --production && \
|
||||
npm i gritty
|
||||
npm i gritty && \
|
||||
npm cache clean --force
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ RUN npm install --production && \
|
|||
apk update && \
|
||||
apk add --no-cache bash make g++ python && \
|
||||
npm i gritty && \
|
||||
npm cache clean --force && \
|
||||
apk del make g++ python && \
|
||||
rm -rf /usr/include /tmp/* /var/cache/apk/*
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue