anchor.diff:  # Copyright (c) 2015, Alexandre Hamelin <alexandre.hamelin gmail.com>
   
  -FROM gentoo/stage3-amd64
  +FROM gentoo-minimal
   MAINTAINER Alexandre Hamelin <alexandre.hamelin gmail.com>
   LABEL description="Base system to run Trac in a Gentoo environment" \
         copyright="(c) 2015, Alexandre Hamelin <alexandre.hamelin gmail.com>" \
         license="MIT"
   
  +RUN sed -i -e 's/-\*//' /etc/portage/make.conf
   RUN echo 'USE="$USE sqlite"' >> /etc/portage/make.conf
  -RUN echo 'MAKEOPTS="-j2"' >> /etc/portage/make.conf
  +RUN sed -i -e '/USE_PYTHON/ s/3\.4/2.7 3.4/' \
  +           -e '/PYTHON_TARGETS/ s/python3_4/python2_7 python3_4/' /etc/portage/make.conf
   
   # Install packages and immediately remove the portage tree to avoid increasing
   # the image size too much. The user should mount a volume at this location
   # instead to have the portage tree stored locally on the host OS.
   RUN emerge-webrsync -q && \
  -    emerge -q app-portage/eix app-portage/gentoolkit app-editors/vim \
  -              net-misc/curl www-servers/apache www-apache/mod_wsgi \
  -              www-apps/trac && \
  +    emerge -q www-servers/apache www-apache/mod_wsgi www-apps/trac && \
       eselect news read --quiet && \
       rm -fr /usr/portage
   
  
positive.code:     trac-admin /var/www/localhost/trac milestone remove milestone2 && \
      trac-admin /var/www/localhost/trac milestone remove milestone3 && \
      trac-admin /var/www/localhost/trac milestone remove milestone4
  RUN mkdir /var/www/localhost/trac/{files,cgi-bin}
  RUN chgrp -R apache /var/www/localhost/trac/{db,log,files,conf,plugins}
  RUN chmod g+rwx /var/www/localhost/trac/{db,log,files,conf,plugins}
  
negative.code: VOLUME /usr/portage
  VOLUME /usr/local/portage
  VOLUME /var/tmp/portage
  VOLUME /var/www/localhost/trac/db
  CMD /usr/local/sbin/run.sh
  