|
1 | | -FROM openresty/openresty:jammy |
| 1 | +# We are pinning to this version of OpenResty as it is compatible with the C++ SDK's usage of OpenSSL. |
| 2 | +# It is unclear why, but the latest version of OpenResty doesn't seem to be compatible: the SDK |
| 3 | +# emits errors of the form 'failed to do XYZ (STORE routines) [asio.ssl:369098857]' |
| 4 | +FROM openresty/openresty:1.21.4.1-0-jammy |
2 | 5 |
|
3 | 6 | # {{ x-release-please-start-version }} |
4 | 7 | ARG VERSION=2.1.1 |
5 | 8 | # {{ x-release-please-end }} |
6 | 9 |
|
7 | | -ARG CPP_SDK_VERSION=3.5.2 |
| 10 | +ARG CPP_SDK_VERSION=3.8.0 |
8 | 11 |
|
9 | 12 | RUN apt-get update && apt-get install -y \ |
10 | 13 | git netbase curl libssl-dev apt-transport-https ca-certificates \ |
@@ -39,20 +42,3 @@ COPY ./examples/env-helper/get_from_env_or_default.lua /usr/local/openresty/ngin |
39 | 42 |
|
40 | 43 | RUN luarocks make launchdarkly-server-sdk-"${VERSION}"-0.rockspec LD_DIR=./cpp-sdk-libs && \ |
41 | 44 | cp launchdarkly_server_sdk.so /usr/local/openresty/lualib/ |
42 | | - |
43 | | -# The strategy for this Docker example is to download the C++ SDK release artifacts and use those instead of compiling |
44 | | -# from source. This is for example/CI purposes only; generally it's better to build from source to ensure all libraries |
45 | | -# are compatible. |
46 | | -# |
47 | | -# Since we require a newer version of boost than is available in Ubuntu 22.04, we grab it from a PPA (mhier/libboost-latest). |
48 | | -# |
49 | | -# The SDK dynamic libs expect the boost libs to follow a specific naming convention, which isn't what |
50 | | -# the libraries from the PPA follow ('-mt' suffix is added to indicate the libraries are built with multithreading support enabled.) |
51 | | -# |
52 | | -# It's not 100% clear if these libraries are multithread enabled (build logs in the PPA seem to indicate it), |
53 | | -# but even so, the C++ SDK is single-threaded. |
54 | | -# |
55 | | -# To workaround, add symlinks with the expected names. |
56 | | -RUN cd /usr/lib/x86_64-linux-gnu && \ |
57 | | - ln -s libboost_json.so.1.81.0 libboost_json-mt-x64.so.1.81.0 && \ |
58 | | - ln -s libboost_url.so.1.81.0 libboost_url-mt-x64.so.1.81.0 |
0 commit comments