Delete all the various forms of NPM cache
They clutter up the image and cause Twistlock to false positive
This commit is contained in:
parent
eac9927414
commit
ddbd0db137
1 changed files with 9 additions and 4 deletions
11
Dockerfile
11
Dockerfile
|
@ -120,9 +120,6 @@ RUN optipng -clobber -quiet static/img/**/*.png
|
|||
RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev libffi-dev libgpgme11-dev nodejs npm jpegoptim optipng
|
||||
RUN apt-get autoremove -y
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN rm -rf .npm
|
||||
RUN rm -rf grunt
|
||||
RUN rm -rf node_modules
|
||||
|
||||
# Set up the init system
|
||||
ADD conf/init/copy_config_files.sh /etc/my_init.d/
|
||||
|
@ -157,6 +154,14 @@ ADD .git/HEAD GIT_HEAD
|
|||
ADD . .
|
||||
RUN pyclean .
|
||||
|
||||
# Cleanup any NPM-related stuff.
|
||||
RUN rm -rf /root/.npm
|
||||
RUN rm -rf /.npm
|
||||
RUN rm -rf /usr/local/lib/node_modules
|
||||
RUN rm -rf /root/node_modules
|
||||
RUN rm -rf /node_modules
|
||||
RUN rm -rf /grunt
|
||||
|
||||
# Run the tests
|
||||
ENV RUN_ACI_TESTS False
|
||||
ADD requirements-tests.txt requirements-tests.txt
|
||||
|
|
Reference in a new issue