anchor.diff:      && service apache2 stop \
   
   # install additional mods
  -    && apt-get install -yf libapache2-mod-php5.6 libapache2-mod-php7.1 libpcre3-dev \
  -    && a2dismod php5.6 && a2dismod php7.0 && a2dismod php7.1 libpcre3-dev \
  +    && apt-get install -yf libapache2-mod-php5.6 libapache2-mod-php7.1 && a2dismod php5.6 && a2dismod php7.0 && a2dismod php7.1 \
   
   # fix v8js reference of json first
       && mv /etc/php/5.6/apache2/conf.d/20-json.ini /etc/php/5.6/apache2/conf.d/15-json.ini \
  
positive.code: FROM niiknow/docker-hostingbase:0.8.5
  
  MAINTAINER friends@niiknow.org
  
  ENV DEBIAN_FRONTEND=noninteractive \
      VESTA=/usr/local/vesta GOLANG_VERSION=1.8.3 \
      DOTNET_DOWNLOAD_URL=https://download.microsoft.com/download/D/7/A/D7A9E4E9-5D25-4F0C-B071-210CB8267943/dotnet-ubuntu.16.04-x64.1.1.2.tar.gz
  ENV GOLANG_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GOLANG_VERSION.linux-amd64.tar.gz
  
  # start
  RUN \
      cd /tmp \
      && apt-get update && apt-get -y upgrade \
  
  # install nodejs, memcached, redis-server, openvpn, mongodb, and couchdb
      && apt-get install -yf nodejs memcached php-memcached redis-server openvpn mongodb-org php-mongodb couchdb \
      && libpcre3-dev libssl-dev \
  
  # relink nodejs
      && ln -sf "$(which nodejs)" /usr/bin/node
  
negative.code:     && echo "\n\n* soft nofile 700000\n* hard nofile 700000\n\n" >> /etc/security/limits.conf \
  
  # vesta monkey patching
      && rm f /usr/local/vesta/func/db.sh && rm -f /usr/local/vesta/func/rebuild.sh \
      && curl -SL https://raw.githubusercontent.com/serghey-rodin/vesta/04d617d756656829fa6c6a0920ca2aeea84f8461/func/db.sh --output /usr/local/vesta/func/db.sh \
      && curl -SL https://raw.githubusercontent.com/serghey-rodin/vesta/04d617d756656829fa6c6a0920ca2aeea84f8461/func/rebuild.sh --output /usr/local/vesta/func/rebuild.sh \
  
  # patch psql9.5 backup
      && sed -i -e "s/\-c \-\-inserts \-O \-x \-i \-f/\-\-inserts \-x \-f/g" /usr/local/vesta/func/db.sh \
  