anchor.diff:  esac
   EOF
   
  -chmod +x /etc/init.d/nginx
  -chkconfig --add nginx
  -chkconfig nginx on
  -
  -
  -mkdir -p /u01/logfiles/nginx
  -chmod +w /u01/logfiles/nginx
  -chown -R www:www /u01/logfiles/nginx
  -
  -cp /usr/local/webserver/nginx/conf/nginx.conf{,.original}
  -cat > /usr/local/webserver/nginx/conf/nginx.conf <<\EOF
  +RUN chmod +x /etc/init.d/nginx
  +RUN chkconfig --add nginx
  +RUN chkconfig nginx on
  +
  +RUN mkdir -p /u01/logfiles/nginx
  +RUN chmod +w /u01/logfiles/nginx
  +RUN chown -R www:www /u01/logfiles/nginx
  +
  +RUN cp /usr/local/webserver/nginx/conf/nginx.conf{,.original}
  +RUN cat > /usr/local/webserver/nginx/conf/nginx.conf <<\EOF
   user  www www;
  -
  -#worker_processes 8;
  -#worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
   worker_rlimit_nofile 65535;
   
   error_log  /u01/logfiles/nginx/nginx_error.log  warn;
  
positive.code: # image
  FROM registry.cn-hangzhou.aliyuncs.com/pixseed/centos7_base
  
  # author
  MAINTAINER WisdomFusion <WisdomFusion@gmail.com>
  
  # repo
  
  RUN mv /etc/yum.repos.d/CentOS-Base.repo{,.backup}
  RUN wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo 
  
  RUN yum -y install epel-release
  
  # update
  
  RUN yum clean all && yum makecache && yum -y update
  
  # install compile tools and libs
  
  RUN yum -y install gcc gcc-c++ autoconf automake cmake zlib zlib-devel compat-libstdc++-33 glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel unzip zip nmap ncurses ncurses-devel sysstat ntp curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libtiff-devel gd gd-devel libxml2 libxml2-devel libXpm libXpm-devel libmcrypt libmcrypt-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers pam-devel libicu libicu-devel
  
  # install tools
  
  RUN yum -y install man wget net-tools iptraf iotop vim-enhanced bash-completion
  
  # Vim settings
  
  
negative.code: # install php extensions
  
  WORKDIR /usr/src/
  RUN tar zxf ImageMagick.tar.gz
  WORKDIR ImageMagick-7.0.4-0/
  RUN ./configure \
    && make \
    && make install \
    && /sbin/ldconfig
  
  WORKDIR /usr/src/
  RUN tar zxf imagick-*.tgz
  WORKDIR imagick-3.4.3RC1/
  RUN /sbin/ldconfig \
    && /usr/local/webserver/php7/bin/phpize \
    && ./configure --with-php-config=/usr/local/webserver/php7/bin/php-config \
    && make
    && make install
  
  WORKDIR /usr/src/
  RUN tar zxf redis-3.1.0.tgz
  WORKDIR redis-3.1.0/
  RUN /usr/local/webserver/php7/bin/phpize \
    && ./configure --with-php-config=/usr/local/webserver/php7/bin/php-config \
    && make \
    && make install
  
  # php.ini
  
  RUN sed -i '/; extension_dir = "ext"/a\extension_dir = "/usr/local/webserver/php7/lib/php/extensions/no-debug-non-zts-20160303/"\nextension=imagick.so\nextension=redis.so' $INSTALL_DIR/php7/etc/php.ini \
    && sed -i '/\[opcache\]/a\\nzend_extension=opcache.so\nopcache.enable=1\nopcache.memory_consumption=256\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=4000\nopcache.revalidate_freq=60\nopcache.fast_shutdown=1\n' $INSTALL_DIR/php7/etc/php.ini
  
  # install nginx
  
  WORKDIR /usr/src/
  RUN tar zxf pcre-*.tar.gz
  WORKDIR pcre-8.39/
  RUN ./configure \
    && make \
    && make install
  
  WORKDIR /usr/src/
  RUN tar zxf nginx-*.tar.gz
  WORKDIR nginx-1.10.2/
  RUN /sbin/ldconfig
  RUN ./configure \
    --prefix=/usr/local/webserver/nginx \
    --user=www \
    --group=www \
    --with-http_v2_module \
    --with-http_sub_module \
    --with-http_ssl_module \
    --with-http_gunzip_module \
    --with-http_gzip_static_module \
    --with-http_realip_module \
    --with-http_flv_module \
    --with-http_stub_status_module \
    --with-http_addition_module \
    && make \
    && make install
  
  RUN cat > /etc/init.d/nginx <<\EOF
  #!/bin/sh
  #
  # nginx - this script starts and stops the nginx daemon
  