anchor.diff:   && make -j${NPROC} \
    && echo "docker-build-script: Installing Openresty" \
    && make install \
  - && echo "docker-build-script: Creating symlinks for Openresty" \
  - && ln -sf $NGINX__PREFIX/sbin/nginx /usr/local/bin/nginx \
  - && ln -sf $NGINX__PREFIX/sbin/nginx /usr/local/bin/openresty \
  - && ln -sf $OPENRESTY__PREFIX/bin/resty /usr/local/bin/resty \
  + && echo "docker-build-script: Creating normalizing symlinks for Openresty and Lua" \
  + && ln -sf $NGINX__PREFIX/sbin/nginx $NGINX__PREFIX/sbin/openresty \
    && ln -sf $OPENRESTY__PREFIX/luajit/bin/luajit-* $OPENRESTY__PREFIX/luajit/bin/lua \
  - && ln -sf $OPENRESTY__PREFIX/luajit/bin/luajit-* /usr/local/bin/lua \
  - && echo "docker-build-script: Creating folder '/var/log/nginx' for consistency" \
  - && mkdir -p /var/log/nginx \
    && echo "docker-build-script: Creating folder '$OPENRESTY__PREFIX/lualib/util' for misc utilities" \
    && mkdir -p $OPENRESTY__PREFIX/lualib/util \
    && echo "docker-build-script: Creating folder '$OPENRESTY__PREFIX/lualib/generated' for runtime-generated lua files" \
    && mkdir -p $OPENRESTY__PREFIX/lualib/generated \
    && echo "docker-build-script: Creating folder '$OPENRESTY__CUSTOM_LUA_PATH' for custom lua libraries" \
  - && mkdir -p $OPENRESTY__CUSTOM_LUA_PATH \
  - && echo "docker-build-script: Creating placeholder '$OPENRESTY__PREFIX/lualib/generated/env_vars_available.lua'" \
  - && touch $NGINX__ENV__LUA_FILE_PATH \
  - && echo "docker-build-script: Creating placeholder '$NGINX__PREFIX/conf/env_vars_available.conf'" \
  - && touch $NGINX__ENV__CONF_FILE_PATH \
  - && echo "docker-build-script: Downloading and extracting LuaRocks" \
  + && mkdir -p $OPENRESTY__CUSTOM_LUA_PATH
  +
  +ENV LUAROCKS__VERSION=2.4.1
  +LABEL org.luarocks.version="2.4.1"
  +
  +RUN echo "docker-build-script: Downloading and extracting LuaRocks" \
    && cd /root \
    && curl -sSL http://keplerproject.github.io/luarocks/releases/luarocks-${LUAROCKS__VERSION}.tar.gz | tar -zxp \
    && mv /root/luarocks-${LUAROCKS__VERSION} /root/luarocks \
  
positive.code:  && rm -rf /root/luarocks* \
   && echo "docker-build-script: Openresty build, installation, and cleanup complete"
  
  RUN luarocks install lua-resty-template \
   && luarocks install lua-resty-validation \
   && luarocks install lua-resty-uuid \
   && luarocks install lua-resty-reqargs \
   && luarocks install lua-resty-session \
   && luarocks install lua-resty-http
  
  COPY artifacts/docker-entrypoint-scripts /docker-entrypoint-scripts
  COPY artifacts/env.lua $OPENRESTY__PREFIX/lualib/util/env.lua
  COPY artifacts/nginx.conf $NGINX__PREFIX/conf/nginx.conf
  COPY artifacts/default.conf $NGINX__PREFIX/conf/sites_enabled/default.conf
  
negative.code: MAINTAINER Brandon Papworth <brandon@papworth.me>
  
  ENV OPENRESTY__PREFIX=/usr/local/openresty \
      NGINX__RUN_PREFIX=/var/run/nginx \
      NGINX__LOCK_PREFIX=/var/lock/nginx \
      NGINX__TMP_PREFIX=/var/tmp/nginx \
      NGINX__LOG_PREFIX=/var/log/nginx \
      OPENRESTY__CUSTOM_LUA_PATH=/data/openresty/lualib \
      NGINX__ERROR_LOG_LEVEL=info \
      NGINX__WORKER_CONNECTIONS=2048 \
      NGINX__WORKER_PROCESSES=1 \
      NGINX__HTTP__LOG_PATH__ACCESS=/dev/stdout \
      NGINX__HTTP__LOG_CONFIG__ACCESS="/dev/stdout  combined" \
      NGINX__HTTP__LOG_PATH__ERROR=/dev/stderr \
      NGINX__RESOLVER=8.8.8.8 \
      NGINX__KEEPALIVE_TIMEOUT=65
  
  ENV NGINX__PREFIX="$OPENRESTY__PREFIX/nginx"
  
  ENV NGINX__CONF_PREFIX="$NGINX__PREFIX/conf" \
      PATH="$PATH:$NGINX__PREFIX/sbin:$OPENRESTY__PREFIX/bin:$OPENRESTY__PREFIX/luajit/bin"
  
  WORKDIR $NGINX__PREFIX/
  
  VOLUME ["/var/run/nginx", "/var/lock/nginx", "/var/tmp/nginx", "/var/log/nginx"]
  
  ENTRYPOINT ["/docker-entrypoint.sh"]
  
  CMD ["nginx"]
  
  ENV NGINX__PID_PATH="$NGINX__RUN_PREFIX/nginx.pid" \
      NGINX__LOCK_PATH="$NGINX__LOCK_PREFIX/nginx.lock" \
      NGINX__ERROR_LOG__CONF_FILE_PATH="$NGINX__CONF_PREFIX/error_log.conf" \
      NGINX__WORKER_CONNECTIONS__CONF_FILE_PATH="$NGINX__CONF_PREFIX/worker_connections.conf" \
      NGINX__WORKER_PROCESSES__CONF_FILE_PATH="$NGINX__CONF_PREFIX/worker_processes.conf" \
      NGINX__HTTP__LOG_CONFIG__ACCESS__CONF_FILE_PATH="$NGINX__CONF_PREFIX/access_log_http.conf" \
      NGINX__HTTP__PROXY__TEMP_PATH="$NGINX__TMP_PREFIX/tmp_proxy" \
      NGINX__HTTP__CLIENT_BODY__TEMP_PATH="$NGINX__TMP_PREFIX/tmp_client_body" \
      NGINX__FCGI__PROXY__TEMP_PATH="$NGINX__TMP_PREFIX/tmp_fcgi" \
      NGINX__ENV__CONF_FILE_PATH="$NGINX__CONF_PREFIX/env_vars_available.conf" \
      NGINX__ENV__LUA_FILE_PATH="$OPENRESTY__PREFIX/lualib/generated/env_vars_available.lua" \
      NGINX__RESOLVER__CONF_FILE_PATH="$NGINX__CONF_PREFIX/resolver.conf" \
      NGINX__KEEPALIVE_TIMEOUT__CONF_FILE_PATH="$NGINX__CONF_PREFIX/keepalive_timeout.conf"
  
  COPY ["artifacts/docker-entrypoint.sh", "artifacts/docker-entrypoint-scripts", "/"]
  
  ENV OPENRESTY__VERSION=1.11.2.1 \
      NGINX__VERSION=1.11.2 \
      LUAJIT__VERSION=2.1.0-beta2
  
  LABEL org.openresty.version="1.11.2.1" \
        org.nginx.version="1.11.2" \
        org.luajit.version="2.1.0-beta2"
  
  RUN ALPINE__CONTAINER_DEPS=" \
      libpcrecpp \
  