Skip to content

Commit

Permalink
fix(openssl): use kong openssl lib to build lua dev dependencies (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion authored Mar 6, 2023
1 parent 23cc604 commit 06d3909
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,10 @@ The result should be a new PR on the Pongo repo.
## 2.5.x unreleased
* Fix: Add missing `fuser` and `netstat` utility that is required for certain test functions.
* Fix: Add missing `fuser` and `netstat` utility that is required for certain test functions
[#384](https://github.com/Kong/kong-pongo/pull/384).
* Fix: compile rocks using the Kong shipped crypto libraries
[#382](https://github.com/Kong/kong-pongo/pull/382).
---
Expand Down
19 changes: 9 additions & 10 deletions assets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ USER root
# LuaRocks needs (un)zip to (un)pack rocks, and dev essentials to build.
# Setup the development dependencies using the make target
# and make the entrypoint executable
#
# Note: 'openssl-dev' (and m4, bsd-headers) is added to build the 'cqueue' rock.
# It provides the headers in the system location for 'make dependencies' to succeed.
# The proper thing to do would be the included ones by specifying them like so:
# CRYPTO_DIR=/usr/local/kong \
# OPENSSL_DIR=/usr/local/kong \
# make dependencies
# But that means hardcoding and that doesn't play well with the nature of Pongo
# that should be independent of Kong versions.

ARG KONG_LIBRARY_PREFIX=/usr/local/kong
ENV KONG_LIBRARY_PREFIX $KONG_LIBRARY_PREFIX

ENV LUAROCKS_CRYPTO_DIR=$KONG_LIBRARY_PREFIX
ENV LUAROCKS_OPENSSL_DIR=$KONG_LIBRARY_PREFIX

ENV LUAROCKS_OPTS="CRYPTO_DIR=$LUAROCKS_CRYPTO_DIR OPENSSL_DIR=$LUAROCKS_OPENSSL_DIR"

# psmisc: provides `fuser`
# net-tools: provides `netstat`
Expand All @@ -47,7 +46,7 @@ RUN pip3 install httpie
RUN curl -k -s -S -L https://github.com/fullstorydev/grpcurl/releases/download/v1.7.0/grpcurl_1.7.0_linux_x86_64.tar.gz | tar xz -C /kong/bin
RUN cd /kong \
&& git config --global url.https://github.com/.insteadOf git://github.com/ \
&& make dependencies \
&& make dependencies $LUAROCKS_OPTS \
&& luarocks install busted-htest \
&& luarocks install luacov

Expand Down

0 comments on commit 06d3909

Please sign in to comment.