# 下载并解压文件 RUN mkdir -p /usr/local/src/ ADD http://tengine.taobao.org/download/tengine-$VERSION.tar.gz /usr/local/src RUN tar -xvf /usr/local/src/tengine-$VERSION.tar.gz -C /usr/local/src/
# 创建安装目录 ENV TENGINE_HOME /usr/local/tengine RUN mkdir -p $TENGINE_HOME
# 进入解压目录 WORKDIR /usr/local/src/tengine-$VERSION
# 编译安装 RUN ./configure \ --user=tengine \ --group=tengine \ --prefix=$TENGINE_HOME \ --with-http_ssl_module \ --with-http_realip_module \ --with-http_concat_module \ --with-http_gzip_static_module \ --with-http_stub_status_module \ --with-http_upstream_consistent_hash_module \ && make \ && make install
# 设置环境变量 ENV PATH $PATH:$TENGINE_HOME/sbin
# 定义APP目录 ENV APP_HOME $TENGINE_HOME/html
# 编译APP项目 RUN mkdir -p /tmp/markdown-weixin \ && git clone https://github.com/rqh656418510/markdown-weixin /tmp/markdown-weixin \ && cd /tmp/markdown-weixin \ && npm config set registry https://registry.npm.taobao.org \ && npm install \ && npm run build