From d1bda64bdd47dc271556ae783db774ab41405a79 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Mon, 29 Jun 2026 12:31:57 +0545 Subject: [PATCH] fix: install libxml2 and libxslt for saml-auth plugin The saml-auth plugin added in APISIX 3.17.0 (apache/apisix#13346) pulls in the lua-resty-saml rock, whose native saml.so links libxml2.so.2 and libxslt.so.1. Those libraries are not present in the runtime images, so every worker logs "failed to load plugin [saml-auth] ... libxml2.so.2: cannot open shared object file" on startup and the plugin is unusable. Install libxml2 + libxslt on debian, ubuntu and redhat images. Also fix the route test: it grepped compose/apisix_log/error.log, which never exists (error.log is symlinked to stderr), so the && exit 1 never fired and startup errors slipped through CI. Grep the container logs instead. --- .github/workflows/apisix_push_docker_hub.yaml | 6 +++++- debian/Dockerfile | 2 +- redhat/Dockerfile | 2 +- ubuntu/Dockerfile | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/apisix_push_docker_hub.yaml b/.github/workflows/apisix_push_docker_hub.yaml index 198bea67..2f526291 100644 --- a/.github/workflows/apisix_push_docker_hub.yaml +++ b/.github/workflows/apisix_push_docker_hub.yaml @@ -34,7 +34,11 @@ jobs: - name: Test route run: | - grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1 + # error.log is symlinked to stderr, so check the container logs + if docker logs compose-apisix-1 2>&1 | grep -C 3 '\[error\]'; then + echo "found errors in apisix startup logs" + exit 1 + fi curl http://127.0.0.1:9180/apisix/admin/routes/1 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' diff --git a/debian/Dockerfile b/debian/Dockerfile index 8bb2b1be..01305d26 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -35,7 +35,7 @@ RUN set -ex; \ ;; \ esac; \ apt update \ - && apt install -y apisix=${APISIX_VERSION}-0 \ + && apt install -y apisix=${APISIX_VERSION}-0 libxml2 libxslt1.1 \ && apt-get purge -y --auto-remove \ && rm -f /usr/local/openresty/bin/etcdctl \ && openresty -V \ diff --git a/redhat/Dockerfile b/redhat/Dockerfile index 0af3bd82..930007e8 100644 --- a/redhat/Dockerfile +++ b/redhat/Dockerfile @@ -23,7 +23,7 @@ COPY ./yum.repos.d/apache-apisix.repo /etc/yum.repos.d/apache-apisix.repo COPY ./yum.repos.d/openresty.repo /etc/yum.repos.d/openresty.repo RUN yum update -y \ - && yum install -y apisix-${APISIX_VERSION} wget\ + && yum install -y apisix-${APISIX_VERSION} wget libxml2 libxslt\ && yum clean all \ && sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t60/g' /etc/login.defs diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index af3854f5..3d058321 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -35,7 +35,7 @@ RUN set -ex; \ ;; \ esac; \ apt update \ - && apt install -y apisix=${APISIX_VERSION}-0 \ + && apt install -y apisix=${APISIX_VERSION}-0 libxml2 libxslt1.1 \ && apt-get purge -y --auto-remove \ && rm -f /usr/local/openresty/bin/etcdctl \ && openresty -V \