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:     addgroup -S redis \
      && adduser -S -G redis redis
  
  # environments for nginx
  ENV REDIS_VERSION 4.0.2
  ENV REDIS_HOME /usr/local/redis
  ENV REDIS_DATA_DIR /var/redis
  
  # install build deps and fetch/build/install nginx
  RUN set -ex \
      && apk update \
      && apk add --virtual .build-deps \
  
negative.code: RUN mkdir -p "$REDIS_DATA_DIR" \
      && chown -R redis:redis "$REDIS_DATA_DIR"
  
  # executeable path
  ENV PATH $REDIS_HOME/bin:$PATH
  
  # data volume
  VOLUME /var/redis
  
  # workshop
  WORKDIR /var/redis
  
  # expose port number
  EXPOSE 6379
  
  # start server
  CMD ["redis-server"]
  