aws / aws-lambda-python-runtime-interface-client

Apache License 2.0
261 stars 74 forks source link

cant install on python:3.8-alpine #23

Closed kennedy closed 3 years ago

kennedy commented 3 years ago

According to Create an image from an alternative base image documentation, Alpine is a supported base image for awslambdaric. However, I am getting a some dependency error

Here is my docker file

FROM python:3.8-alpine as build-image
RUN apk add --no-cache --update --virtual make cmake unzip openssl-dev automake g++ python3-dev build-base gcc libtool
run apk add --no-cache --update autoconf libcurl
RUN python -m pip install awslambdaric

Here is my error:

https://gist.github.com/kennedy/60d57e0dea9103ef1a7d599dbecef127#file-awslambdaric-log-L813-L831

#7 23.51     config.status: error: in `/tmp/pip-install-m_cb9m6d/awslambdaric_3ceece28e9b44de98bd880f9bdf2aaa5/deps/curl-curl-7_65_3':
#7 23.51     config.status: error: Something went wrong bootstrapping makefile fragments
#7 23.51         for automatic dependency tracking.  If GNU make was not used, consider
#7 23.51         re-running the configure script with MAKE="gmake" (or whatever is
#7 23.51         necessary).  You can also try re-running configure with the
#7 23.51         '--disable-dependency-tracking' option to at least be able to build
#7 23.51         the package (albeit without support for automatic dependency tracking).
#7 23.51     See `config.log' for more details
#7 23.51     Traceback (most recent call last):
#7 23.51       File "<string>", line 1, in <module>
#7 23.51       File "/tmp/pip-install-m_cb9m6d/awslambdaric_3ceece28e9b44de98bd880f9bdf2aaa5/setup.py", line 94, in <module>
#7 23.51         ext_modules=get_runtime_client_extension(),
#7 23.51       File "/tmp/pip-install-m_cb9m6d/awslambdaric_3ceece28e9b44de98bd880f9bdf2aaa5/setup.py", line 45, in get_runtime_client_extension
#7 23.51         extra_link_args=get_curl_extra_linker_flags(),
#7 23.51       File "/tmp/pip-install-m_cb9m6d/awslambdaric_3ceece28e9b44de98bd880f9bdf2aaa5/setup.py", line 18, in get_curl_extra_linker_flags
#7 23.51         check_call(["./scripts/preinstall.sh"])
#7 23.51       File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
#7 23.51         raise CalledProcessError(retcode, cmd)
#7 23.51     subprocess.CalledProcessError: Command '['./scripts/preinstall.sh']' returned non-zero exit status 1.
kennedy commented 3 years ago

I think I found a solution: https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/