2021-09-06 11:05:20 +00:00
|
|
|
FROM openresty/openresty:1.19.9.1-bionic
|
2021-01-08 12:47:30 +00:00
|
|
|
|
2021-08-27 12:15:22 +00:00
|
|
|
RUN luarocks install lua-resty-http && \
|
2021-12-20 10:27:29 +00:00
|
|
|
luarocks install hasher && \
|
2021-08-27 12:15:22 +00:00
|
|
|
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
|
|
|
|
-subj '/CN=local-certificate' \
|
|
|
|
-keyout /etc/ssl/local-certificate.key \
|
|
|
|
-out /etc/ssl/local-certificate.crt
|
2021-01-08 12:47:30 +00:00
|
|
|
|
2021-08-27 12:15:22 +00:00
|
|
|
COPY mo ./
|
2021-11-05 11:57:06 +00:00
|
|
|
COPY libs /etc/nginx/libs
|
2021-08-27 12:15:22 +00:00
|
|
|
COPY conf.d /etc/nginx/conf.d
|
|
|
|
COPY conf.d.templates /etc/nginx/conf.d.templates
|
2021-12-23 14:09:54 +00:00
|
|
|
COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
|
2021-08-27 12:15:22 +00:00
|
|
|
|
|
|
|
CMD [ "bash", "-c", \
|
|
|
|
"./mo < /etc/nginx/conf.d.templates/server.account.conf > /etc/nginx/conf.d/server.account.conf ; \
|
|
|
|
./mo < /etc/nginx/conf.d.templates/server.api.conf > /etc/nginx/conf.d/server.api.conf; \
|
|
|
|
./mo < /etc/nginx/conf.d.templates/server.hns.conf > /etc/nginx/conf.d/server.hns.conf; \
|
|
|
|
./mo < /etc/nginx/conf.d.templates/server.skylink.conf > /etc/nginx/conf.d/server.skylink.conf ; \
|
|
|
|
/usr/local/openresty/bin/openresty '-g daemon off;'" \
|
|
|
|
]
|