FROM openresty/openresty:1.13.6.2-2-centosARG RESTY_YUM_REPO="http://mirrors.aliyun.com/repo/Centos-7.repo"ARG WORK_DIR="/usr/local/openresty/nginx"ARG USER=rootRUN sed -i 's/plugins=1/plugins=0/' /etc/yum.confRUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.confRUN rm -rf /etc/yum.repos.d/CentOS*RUN yum clean all && yum-config-manager --add-repo ${RESTY_YUM_REPO} && yum makecache && rpm --rebuilddb && yum install -y vim net-tools iproute && yum groupinstall -y 'Development Tools'RUN luarocks --tree=${WORK_DIR}/luarocks install lua-cjson && luarocks --tree=${WORK_DIR}/luarocks install penlight && luarocks --tree=${WORK_DIR}/luarocks install version && luarocks --tree=${WORK_DIR}/luarocks install lua-resty-http && luarocks --tree=${WORK_DIR}/luarocks install luaunit && luarocks --tree=${WORK_DIR}/luarocks install ldoc && luarocks --tree=${WORK_DIR}/luarocks install lua-discount && luarocks --tree=${WORK_DIR}/luarocks install serpent && luarocks --tree=${WORK_DIR}/luarocks install luacov && luarocks --tree=${WORK_DIR}/luarocks install cluacov && luarocks --tree=${WORK_DIR}/luarocks install mmdblua && luarocks --tree=${WORK_DIR}/luarocks install lua-resty-jit-uuid && luarocks --tree=${WORK_DIR}/luarocks install luasocket FROM openresty/openresty:1.13.6.2-2-centosARG WORK_DIR="/usr/local/openresty/nginx"ARG USER=rootCOPY --from=0 ${WORK_DIR}/luarocks ${WORK_DIR}/luarocksENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${WORK_DIR}/c_libADD nginx/lib ${WORK_DIR}/libADD nginx/c_lib ${WORK_DIR}/c_libADD bin/go-dnsmasq /usr/local/bin/go-dnsmasqADD nginx/conf/nginx.conf.template ${WORK_DIR}/conf/nginx.conf.templateADD nginx/conf/vhosts ${WORK_DIR}/conf/vhostsADD nginx/lua ${WORK_DIR}/luaWORKDIR ${WORK_DIR}ADD entrypoint.sh /entrypoint.shENTRYPOINT /entrypoint.sh