Skip to content

Commit

Permalink
Build modules against same GLIBC as for official Nginx image (#587)
Browse files Browse the repository at this point in the history
Switch from ubuntu to debian for ci image to build binaries

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.
  • Loading branch information
miry authored Mar 14, 2024
1 parent 81d8237 commit dfd9a38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ docker-image:
docker-image-alpine:
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t opentracing-contrib/nginx-opentracing --target final --build-arg BUILD_OS=alpine .

docker-build-binaries:
DOCKER_BUILDKIT=1 docker buildx build --build-arg NGINX_VERSION=1.25.4 --platform linux/amd64 -f build/Dockerfile -t nginx-opentracing-binaries --target=export --output "type=local,dest=out" --progress=plain --no-cache --pull .

.PHONY: test
test:
./ci/system_testing.sh
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.10 as base
FROM debian:stable as base

RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
Expand Down

0 comments on commit dfd9a38

Please sign in to comment.