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

Build modules against same GLIBC as for official Nginx image #587

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

miry
Copy link
Collaborator

@miry miry commented Mar 6, 2024

Extracted the problem described in DataDog/dd-opentracing-cpp#276 (comment)

What we have now?

We build docker images base on official nginx images (debian or alpine):

FROM nginx:1.25.4 as nginx-debian

In same time we build bin modules for releasing using image ubuntu:2023 build/Dockerfile.

The problem that nginx images most of time would have older GLIBC version.

@dgoffredo wrote:

The latest release (v0.34.0) of nginx-opentracing is no longer compatible with nginx's debian-based docker images. nginx-opentracing v0.34.0 requires GLIBC 2.38, while e.g. nginx:1.25.4 has GLIBC 2.36:

Proposals

  • Specify the GLIBC version in binaries build to be the same as in nginx
  • Build multiple modules built against different OS: debian, ubuntu, alpine

@lucacome What will be your thoughts about this?

@whyman10x
Copy link

whyman10x commented Mar 5, 2024

Yep, this breaks usage of the binary on all Ubuntu LTS at the very least.

If the build/Dockerfile is updated to 18.04, it would link against an older more compatible glibc version at least.

Switching from using Ubuntu to Debian for the CI image to build binaries is necessary because of compatibility issues with GLIBC versions.
Currently, the docker image for nginx uses `debian:stable` as its base.
However, latest nginx opentracing modules built on `ubuntu:23` has newer versions of GLIBC,
causing problems when trying to use the nginx docker image to deploy the latest binaries on the release page.

For example, when trying to integrate the latest release (v0.34.0) of nginx-opentracing with nginx Docker images,
there are compatibility issues. nginx-opentracing v0.34.0 needs GLIBC 2.38, but nginx:1.25.4 has GLIBC 2.36, causing errors like:

```
The latest release (v0.34.0) of nginx-opentracing is no longer compatible with nginx's debian-based docker images. nginx-opentracing v0.34.0 requires GLIBC 2.38, while e.g. nginx:1.25.4 has GLIBC 2.36:
```

Switching to Debian as the standard base image will help prevent future problems with different GLIBC versions and make integration smoother.
@miry miry requested a review from lucacome March 6, 2024 15:42
@miry
Copy link
Collaborator Author

miry commented Mar 10, 2024

@lucacome Would you like tp review those changes.

@miry miry self-assigned this Mar 10, 2024
@miry miry merged commit dfd9a38 into master Mar 14, 2024
30 checks passed
@miry miry deleted the use-debian-for-binaries branch March 14, 2024 08:27
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

Successfully merging this pull request may close these issues.

None yet

2 participants