From 337bd5ffc9458246c13cdbdbdbc0d019a61a1b08 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 3 May 2019 21:20:43 -0400 Subject: [PATCH] Switch to openresty image (nginx with some lua magic) --- dockerfile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/dockerfile b/dockerfile index 5b3bd7124..3c0f245d6 100644 --- a/dockerfile +++ b/dockerfile @@ -15,11 +15,20 @@ ADD . /usr/src/app/ RUN yarn install RUN yarn run build:web -# # Stage 2: Bundle the built application into a Docker container -# # which runs Nginx using Alpine Linux -FROM nginx:1.15.5-alpine -RUN rm -rf /etc/nginx/conf.d -COPY conf /etc/nginx -COPY --from=builder /usr/src/app/build /usr/share/nginx/html -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] +# Stage 2: Bundle the built application into a Docker container +# which runs openresty (nginx) using Alpine Linux +FROM openresty/openresty:alpine-fat + +RUN mkdir /var/log/nginx +RUN apk add --no-cache openssl +RUN apk add --no-cache openssl-dev +RUN apk add --no-cache git +RUN apk add --no-cache gcc +# RUN luarocks install lua-resty-openidc + +RUN luarocks install lua-resty-jwt +RUN luarocks install lua-resty-session +RUN luarocks install lua-resty-jwt +RUN luarocks install lua-resty-http +RUN luarocks install lua-resty-openidc +RUN luarocks install luacrypto