Open ejstembler opened 4 years ago
Getting the same error.
same here
guys, i was able to install pg gem following this guide: https://stackoverflow.com/questions/54330779/how-to-correctly-load-a-gem-extension-in-aws-lambda
with some changement it works for me like this:
# Dockerfile
FROM lambci/lambda:build-ruby2.5
RUN yum install -y postgresql-devel postgresql
RUN gem update bundler
ADD Gemfile /var/task/Gemfile
ADD Gemfile.lock /var/task/Gemfile.lock
RUN bundle install --path /var/task/vendor/bundle --clean
maybe i also ran RUN yum update -y
if that changed anything, i donno
# build.sh
set -e
rm -rf lib && rm -rf vendor && mkdir lib && mkdir vendor
docker build -t lambda-ruby2.5-postgresql10x -f Dockerfile .
CONTAINER=$(docker run -d lambda-ruby2.5-postgresql10x false)
docker cp \
$CONTAINER:/var/task/vendor/ \
./
docker cp \
$CONTAINER:/usr/lib64/libpq.so.5.5 \
lib/libpq.so.5
# docker cp \
# $CONTAINER:/usr/lib64/mysql/. \
# lib/
docker rm $CONTAINER
hope this helps
Getting this error during Docker build:
Here's the full output: