Docker 安装 openresty

2018-06-21  本文已影响0人  wuyuan0127

下载openresty:

wget https://openresty.org/download/openresty-1.13.6.1.tar.gz

tar zxvf openresty-1.13.6.1.tar.gz

准备启动 openresty脚本:   start.sh

#nginx -c /usr/local/openresty/nginx/conf/nginx.conf

nginx -g "daemon off;"

Dockerfile内容:

from centos

COPY ./start.sh /

COPY openresty-1.13.6.1 /home/openresty-1.13.6.1

RUN yum -y install readline-devel pcre pcre-devel openssl openssl-devel gcc curl GeoIP-devel wget

RUN cd /home/openresty-1.13.6.1 && chmod +x  configure  && ./configure --with-luajit --with-pcre --with-http_gzip_static_module --with-http_realip_module --with-http_geoip_module --with-http_ssl_module  --with-http_stub_status_module \

&& make && make install

ENV NGINX_HOME=/usr/local/openresty/nginx

ENV PATH $NGINX_HOME/sbin:$PATH

RUN chmod +x /start.sh

ENTRYPOINT ["sh","/start.sh"]

EXPOSE 80

上一篇下一篇

猜你喜欢

热点阅读