FROM openresty/openresty:latest

# Install system packages
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        git \
        curl \
        luarocks \
        ca-certificates

# Install Lua packages
RUN luarocks install lua-resty-openidc
RUN luarocks install lua-resty-session
#RUN luarocks install lua-cjson

# Clean up
RUN rm -rf /var/lib/apt/lists/*