anchor.diff:  # author
   MAINTAINER Wang <shadowman@shellboot.com>
   
  -# China mirrors and create www-user
  +# China mirrors and create redis user and group
   RUN set -x \
       && country=`wget -T1 -q -O- google.com 2>&1 | sed -nr 's/.*(timed\ out).*/China/p'` \
       && if [ "$country" == "China" ]; then \
  
positive.code:     && export PREFIX="$REDIS_HOME" \
      \
      && grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 1$' ./src/server.h \
      && sed -ri 's!^(#define CONFIG_DEFAULT_PROTECTED_MODE) 1$!\1 0!' ./src/server.h \
      && grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 0$' ./src/server.h \
      \
      && make \
  
negative.code:     && rm -rf "/usr/src/*" \
      \
      && { find . -type f -perm +0111 -exec strip --strip-all {} + || true; } \
      && redisRuntimeDeps="$( \
              scanelf --needed --nobanner --format '%n#p' --recursive $REDIS_HOME \
                  | tr ',' '\n' \
                  | sort -u \
                  | awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
         )" \
      && apk add --virtual .redis-runtime-deps $redisRuntimeDeps \
      && apk del .build-deps \
      \
      && rm -rf /var/cache/apk/* \
  