add upgrade cleanup functionality of dokuwiki (grep/find) and reorganise commands to save image space (18 MB, 10%)

master
Benedikt von St. Vieth 9 years ago
parent 68b92d04e9
commit e7290fa571
  1. 35
      Dockerfile

@ -13,27 +13,28 @@ ENV DOKUWIKI_VERSION 2015-08-10a
ENV DOKUWIKI_CSUM a4b8ae00ce94e42d4ef52dd8f4ad30fe ENV DOKUWIKI_CSUM a4b8ae00ce94e42d4ef52dd8f4ad30fe
ENV LAST_REFRESHED 6. September 2015 ENV LAST_REFRESHED 6. September 2015
# Update & install packages
RUN apt-get update && apt-get -y upgrade # Update & install packages & cleanup afterwards
RUN apt-get -y install wget \ RUN DEBIAN_FRONTEND=noninteractive \
lighttpd \ apt-get update && \
php5-cgi \ apt-get -y upgrade && \
php5-gd apt-get -y install wget lighttpd php5-cgi php5-gd && \
apt-get clean autoclean && \
# Download & deploy twiki apt-get autoremove && \
RUN wget -O /dokuwiki.tgz \ rm -rf /var/lib/{apt,dpkg,cache,log}
"http://download.dokuwiki.org/src/dokuwiki/dokuwiki-$DOKUWIKI_VERSION.tgz"
RUN if [ "$DOKUWIKI_CSUM" != "$(md5sum /dokuwiki.tgz | awk '{print($1)}')" ];\ # Download & check & deploy dokuwiki & cleanup
then echo "Wrong md5sum of downloaded file!"; exit 1; fi; RUN wget -q -O /dokuwiki.tgz "http://download.dokuwiki.org/src/dokuwiki/dokuwiki-$DOKUWIKI_VERSION.tgz" && \
RUN tar -zxf dokuwiki.tgz if [ "$DOKUWIKI_CSUM" != "$(md5sum /dokuwiki.tgz | awk '{print($1)}')" ];then echo "Wrong md5sum of downloaded file!"; exit 1; fi && \
RUN mv "/dokuwiki-$DOKUWIKI_VERSION" /dokuwiki mkdir /dokuwiki && \
tar -zxf dokuwiki.tgz -C /dokuwiki --strip-components 1 && \
rm -rf dokuwiki.tgz && \
cd /dokuwiki && \
grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -vrf
# Set up ownership # Set up ownership
RUN chown -R www-data:www-data /dokuwiki RUN chown -R www-data:www-data /dokuwiki
# Cleanup
RUN rm dokuwiki.tgz
# Configure lighttpd # Configure lighttpd
ADD dokuwiki.conf /etc/lighttpd/conf-available/20-dokuwiki.conf ADD dokuwiki.conf /etc/lighttpd/conf-available/20-dokuwiki.conf
RUN lighty-enable-mod dokuwiki fastcgi accesslog RUN lighty-enable-mod dokuwiki fastcgi accesslog

Loading…
Cancel
Save