-
Notifications
You must be signed in to change notification settings - Fork 51
Support Alpine Linux (no glibc, musl libc) #57
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
Comments
Thanks for reporting! I don't see anything obvious in the example and it runs fine on Ubuntu 24.04. So maybe Alpine Linux is missing some libraries or this is maybe a permission issue? Are there any additional logs that can help you diagnose? |
I ran your issue through AI; here's the relevant part:
I can confirm that ObjectBox for Linux depends on glibc. |
PS.: With that info, it might be possible to find workarounds. E.g. try this before running ObjectBox:
Please let us know if you find a working workaround. |
Hy guys I already tried with gcompat but it doesn't work. the only way that i found is that one:
is already attached on the .zip that I uploaded, is named as 'Dockerfile.work' |
Great, thanks for pointing out that previously hidden gem! May I ask your motivation to use alpine? Anything else than being small? As an alternative, one could use e.g. Rocky Minimal, e.g. |
Yes, the primary reason is its small size. I believe the errors I encountered were due to differing library versions between the Debian and Alpine images. The Alpine image likely contains newer versions.
Attached is the Dockerfile that produces the errors I previously reported. As mentioned, the build process completes without errors; the errors only occur when running the container. I suspect the issue stems from the differing versions of libgcc and libstdc++ libraries between the Alpine and Debian-based images. |
Some background info... In the standard builds, ObjectBox links with older version of glibc etc. for better backward compatibility. E.g. you run it on systems with at least glibc 2.28 and GLIBCXX 3.4.25. |
Uh oh!
There was an error while loading. Please reload this page.
Description
unable to run application on a docker alpine image.
Basic info
Hi guys I'm using the last version of golang objectbox library. I would like to run my application on a alpine docker image but I'm not able to do it.
I'm getting the following error:
2025/03/15 14:55:44 ObjectBox Go Quickstart
panic: Could not create box for entity ID 1: No error information
goroutine 1 [running]:
github.com/objectbox/objectbox-go/objectbox.(*ObjectBox).InternalBox(0xc0000164b0?, 0x1)
/go/pkg/mod/github.com/objectbox/[email protected]/objectbox/objectbox.go:198 +0xaa
objectbox-test/model.BoxForTask(...)
/usr/bin/model/model.obx.go:146
main.main()
/usr/bin/main.go:22 +0xd7
How to reproduce
Steps to reproduce the behavior:
objectbox-test.zip
I attached my demo apps
The text was updated successfully, but these errors were encountered: