FROM centos:centos7
MAINTAINER chen
ENV VERSION=1.19.9.1
# 配置阿里yum源
RUN cd /etc/yum.repos.d/ && yum install -y wget && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#基础依赖
RUN yum install -y pcre-devel openssl-devel gcc postgresql-devel perl make
#RUN useradd nginx -s /sbin/nologin
#安装openresty
RUN wget https://openresty.org/download/openresty-${VERSION}.tar.gz && \
mv openresty-${VERSION}.tar.gz /usr/local && \
tar -xzvf /usr/local/openresty-${VERSION}.tar.gz -C /usr/local/ && cd /usr/local/openresty-${VERSION} && \
./configure --prefix=/usr/local/openresty \
--sbin-path=/usr/local/openresty/nginx/sbin/nginx \
--conf-path=/usr/local/openresty/nginx/conf/nginx.conf \
--pid-path=/usr/local/openresty/nginx/run/nginx.pid \
--error-log-path=/usr/local/openresty/nginx/logs/error.log \
--http-log-path=/usr/local/openresty/nginx/logs/access.log \
--user=nginx \
--group=nginx \
--with-pcre \
--with-stream \
--with-threads \
--with-file-aio \
--with-http_v2_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_gzip_static_module \
--with-http_stub_status_module && cd /usr/local/openresty-${VERSION} && \
make && make install
ENV PATH=$PATH:/usr/local/openresty/bin
WORKDIR /usr/local/openresty
EXPOSE 80 443
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
03-26
03-19
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交