You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MY SETUP:
OS: Linux Mint 21
GLIBC 2.35
Dockerfile Image: ruby:3.1.4-bullseye (which has GLIBC 2.31)
STEPS TO REPRODUCE
Dockerize existing rails app make docker/build
Add template.yaml .bin/deploy (taken from cookiecutter)
ERROR (Cloud Watch logs)
"errorMessage": "/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.18.3/lib/bootsnap/bootsnap.so) - /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.18.3/lib/bootsnap/bootsnap.so",
MY FIX
I noticed that the deploy script is bundling all the gems again outside of the image on my host machine which uses a different GLIBC version. I don't know the significance of this or why it is needed (please let me know as I'm new to SAM). However I was able to deploy without error by removing the bundle install lines in bin/deploy like so:
Afterwards I'm able to deploy my lambda without any noticeable issue yet.
What do the devs think of this fix? Am I on to something here or should that bundle install be called on my host machine rather than just inside the Dockerfile?
The text was updated successfully, but these errors were encountered:
bundle install is needed to run precompile or run db:migrate. If you do not need to do either of these things then there is no reason to do a bundle install in bin/deploy. Also in the cookie cutter he is running bundle install and coping over the bundle cache which makes the lambda quicker. Im not sure how he got that part to work in arm64 so im doing a bundle install in my Dockerfile
MY SETUP:
OS: Linux Mint 21
GLIBC 2.35
Dockerfile Image: ruby:3.1.4-bullseye (which has GLIBC 2.31)
STEPS TO REPRODUCE
Dockerize existing rails app
make docker/build
Add template.yaml
.bin/deploy
(taken from cookiecutter)ERROR (Cloud Watch logs)
"errorMessage": "/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.18.3/lib/bootsnap/bootsnap.so) - /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.18.3/lib/bootsnap/bootsnap.so",
MY FIX
I noticed that the deploy script is bundling all the gems again outside of the image on my host machine which uses a different GLIBC version. I don't know the significance of this or why it is needed (please let me know as I'm new to SAM). However I was able to deploy without error by removing the bundle install lines in bin/deploy like so:
# echo '== Bundle For Deployment =='
# bundle config --global silence_root_warning true
# bundle config --local deployment true
# bundle config --local without 'development test'
# bundle config --local path './vendor/bundle'
# bundle install --quiet --jobs 4
Afterwards I'm able to deploy my lambda without any noticeable issue yet.
What do the devs think of this fix? Am I on to something here or should that
bundle install
be called on my host machine rather than just inside the Dockerfile?The text was updated successfully, but these errors were encountered: