anchor.diff:      && 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 \
  +    && 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 \
  
positive.code: RUN mkdir -p "$REDIS_DATA_DIR" \
      && chown -R redis:redis "$REDIS_DATA_DIR"
  
  COPY start-redis-server.sh /usr/local/redis/bin
  ENV PATH $REDIS_HOME/bin:$PATH
  VOLUME /var/redis
  WORKDIR /var/redis
  EXPOSE 6379
  CMD ["start-redis-server"]
  
negative.code: # author
  MAINTAINER Wang <shadowman@shellboot.com>
  
  # 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 \
  