-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
40 lines (33 loc) · 1.27 KB
/
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
35
36
37
38
39
40
FROM centos:latest
MAINTAINER Sandro Cirulli <[email protected]>
ENV OPENRESTY_VERSION=1.9.7.4
# install system dependencies and libraries
RUN yum clean all && yum -y update
RUN yum install -y \
readline-devel \
pcre-devel \
openssl-devel \
gcc \
perl \
make \
curl \
tar
# install openresty at default location /usr/local/openresty
RUN curl -sSL http://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz | tar -xvz \
&& cd openresty-${OPENRESTY_VERSION} \
&& ./configure \
--with-luajit \
--with-http_iconv_module \
--with-ipv6 \
-j2 \
&& make \
&& make install
# copy 3scale nginx configuration files
COPY conf/nginx_123456789.conf /usr/local/openresty/nginx/conf/nginx_123456789.conf
COPY conf/nginx_123456789.lua /usr/local/openresty/nginx/conf/nginx_123456789.lua
# copy SSH certificate
COPY certificates/bundle.crt /usr/local/openresty/nginx/ssl/bundle.crt
COPY certificates/certificate.key /usr/local/openresty/nginx/ssl/certificate.key
# remove port 80 to force HTTPS on port 443
EXPOSE 80 443
CMD ["/usr/local/openresty/nginx/sbin/nginx","-p","/usr/local/openresty/nginx/","-c","/usr/local/openresty/nginx/conf/nginx_123456789.conf"]