Merge pull request #2174 from jzelinskie/pngcrush

dockerfile: optimize static images
This commit is contained in:
Jimmy Zelinskie 2016-12-07 13:04:28 -05:00 committed by GitHub
commit b671ee938a

View file

@ -16,6 +16,7 @@ RUN apt-get install -y \
gdb \
gdebi-core \
git \
jpegoptim \
libevent-2.0.5 \
libevent-dev \
libffi-dev \
@ -36,6 +37,7 @@ RUN apt-get install -y \
nginx \
nodejs \
npm \
optipng \
python-dbg \
python-dev \
python-pip \
@ -102,7 +104,12 @@ RUN cd grunt && npm install
# Run grunt
RUN cd grunt && grunt
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
# Optimize our images
ADD static/img static/img
RUN jpegoptim static/img/**/*.jpg
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 grunt