
Question:
I am trying to build an openresty alpine image with lua-openssl like so
FROM openresty/openresty:alpine-fat
# Set the version
ENV RESTY_CONFIG_OPTIONS_MORE "--with-ngx_http_ssl_module"
EXPOSE 80
EXPOSE 443
RUN ls /usr/local/openresty/nginx/logs
COPY lualib /usr/local/openresty/nginx/lualib
RUN chown -R nobody:root /usr/local/openresty/nginx/lualib
RUN apk add --update \
openssl openssl-dev \
lua5.3 luajit-dev lua-socket \
git
RUN git clone https://github.com/zhaozg/lua-openssl.git /usr/local/lua-openssl; \
cd /usr/local/lua-openssl; \
git checkout e923252b28cff43add6382853cc85ed888c4474b; \
make
But I get the one below and a lot of such errors:
<blockquote>/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74:
undefined reference to strerror_s' ./libopenssl.a(cms.o): In function
compat53_strerror':
/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74:
undefined reference to strerror_s'
./libopenssl.a(compat.o):/usr/local/lua-openssl/deps/lua-compat/c-api/compat-5.3.c:74:
more undefined references to
strerror_s' follow collect2: error: ld
returned 1 exit status make: *** [Makefile:94: openssl.so] Error 1
Am I missing a package?
Answer1:(1) We grabbed the trusty image instead of alpine-fat. (2) Overrode the make file with one that uses lcrypto lib to build.
And that is the only setting I know to make this work.
I did not try compiling with MSVC++.
My issue and it's fix is tracked in <a href="https://github.com/zhaozg/lua-openssl/issues/138" rel="nofollow">https://github.com/zhaozg/lua-openssl/issues/138</a>