diff --git a/.gitignore b/.gitignore index c088bdb..6cdbaae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea - +*.rock # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/kong-plugin-jwt-keycloak-1.0.0-1.rockspec b/kong-plugin-jwt-keycloak-1.0.0-1.rockspec index 86637d0..46699c3 100644 --- a/kong-plugin-jwt-keycloak-1.0.0-1.rockspec +++ b/kong-plugin-jwt-keycloak-1.0.0-1.rockspec @@ -9,7 +9,7 @@ local pluginName = package:match("^kong%-plugin%-(.+)$") -- "jwt-keycloak" supported_platforms = {"linux", "macosx"} source = { - url = "https://github.com/gbbirkisson/kong-plugin-jwt-keycloak", + url = "git://github.com/gbbirkisson/kong-plugin-jwt-keycloak", tag = "v1.0.0", } description = { diff --git a/luarocks.Dockerfile b/luarocks.Dockerfile index c3a59e1..91bb0ef 100644 --- a/luarocks.Dockerfile +++ b/luarocks.Dockerfile @@ -1,4 +1,16 @@ +FROM kong:1.0 as packer + +ENV LUAROCKS_MODULE=kong-plugin-jwt-keycloak + +RUN apk add --no-cache git zip && \ + git config --global url.https://github.com/.insteadOf git://github.com/ && \ + luarocks install ${LUAROCKS_MODULE} && \ + luarocks pack ${LUAROCKS_MODULE} + FROM kong:1.0 -RUN luarocks install kong-plugin-jwt-keycloak -ENV KONG_PLUGINS="bundled,jwt-keycloak" \ No newline at end of file +ENV KONG_PLUGINS="bundled,jwt-keycloak" + +COPY --from=packer kong-plugin-jwt-keycloak* /tmp/ +RUN luarocks install /tmp/kong-plugin-jwt-keycloak* &&\ + rm /tmp/* \ No newline at end of file