FROM openresty/openresty:alpine-fat RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-http RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-cookie RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-iputils RUN apk add --no-cache ca-certificates certbot openssl RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-auto-ssl RUN mkdir /etc/resty-auto-ssl && chown -R nobody /etc/resty-auto-ssl RUN openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ -subj '/CN=fallback.invalid' \ -keyout /etc/ssl/resty-auto-ssl-fallback.key \ -out /etc/ssl/resty-auto-ssl-fallback.crt COPY default.conf /etc/nginx/conf.d/default.conf COPY default.main /etc/nginx/conf.d/default.main COPY lua/* /opt/sitelen-tu/