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
13
Dockerfile
13
Dockerfile
|
@ -12,7 +12,7 @@ RUN add-apt-repository ppa:nginx/development
|
|||
# Install system packages
|
||||
RUN apt-get update && apt-get upgrade -y # 22FEB2017
|
||||
RUN apt-get install -y \
|
||||
dnsmasq \
|
||||
dnsmasq \
|
||||
g++ \
|
||||
gdb \
|
||||
gdebi-core \
|
||||
|
@ -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