Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError caused by Docker image ruby:3-alpine3.19 #435

Closed
euxx opened this issue Dec 12, 2023 · 1 comment
Closed

LoadError caused by Docker image ruby:3-alpine3.19 #435

euxx opened this issue Dec 12, 2023 · 1 comment

Comments

@euxx
Copy link

euxx commented Dec 12, 2023

Hi, just found a weird issue where the deployment by Docker failed when the app code didn't change.

With:

  • Ruby 3.2.2
  • Rails 7.1.1
  • sqlite3 1.6.9
  • Docker image ruby:3-alpine3.19,

Starting the Rails server will raise an error:

LoadError: cannot load such file -- sqlite3/sqlite3_native (LoadError)

Caused by:
LoadError: Error relocating /usr/local/bundle/gems/sqlite3-1.6.9-aarch64-linux/lib/sqlite3/3.2/sqlite3_native.so: fcntl64: symbol not found - /usr/local/bundle/gems/sqlite3-1.6.9-aarch64-linux/lib/sqlite3/3.2/sqlite3_native.so (LoadError)

Later on, I figured out that it is caused by the Docker image ruby:3-alpine3.19.

In the Dockerfile, we use FROM ruby:3-alpine as builder, so it will fetch the latest image version when docker build.

A few days ago, Alpine released version 3.19, which affected the ruby:3-alpine Docker image, causing it to fetch ruby:3-alpine3.19 and resulting in this error.

We solved this issue by specifying the image version as ruby:3-alpine3.18 for now.

Just report this here to see what the problem may be and if there's anything sqlite3 could do.

You could find more information about Alpine 3.19 in the Release Notes for Alpine 3.19.

A rails new app should reproduce the issue, and a Dockerfile example.

@flavorjones
Copy link
Member

Similar report just came in #434.

I believe something changed in the alpine image, since we test alpine in the CI pipeline and it passed last week, but started failing yesterday with the new image

I'm going to close this as a duplicate of #434, please follow along there.

@flavorjones flavorjones closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants