-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (25 loc) · 881 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM homqyy/dev_env_centos8 as compile
RUN yum install -y pcre-devel openssl-devel
WORKDIR /usr/src/hengine
COPY . .
RUN bash ./configure \
--prefix=/usr/local/hengine \
--with-http_ssl_module \
--with-http_sub_module \
--with-stream_ssl_module \
--with-stream \
--with-stream_sni \
--add-module=./modules/ngx_http_proxy_connect_module \
&& make && make install
FROM centos:8
# update yum repos
RUN rm -f /etc/yum.repos.d/* \
&& cd /etc/yum.repos.d/ \
&& curl http://mirrors.aliyun.com/repo/Centos-8.repo > CentOS-Linux-BaseOS.repo \
&& sed -i 's/\$releasever/8-stream/g' CentOS-Linux-BaseOS.repo \
&& cd - \
&& yum clean all \
&& yum makecache
COPY --from=compile /usr/local/hengine/ /usr/local/hengine/
WORKDIR /usr/local/hengine
CMD [ "/usr/local/hengine/sbin/nginx", "-g", "daemon off;" ]