From 21761aff3a22da3fc518820ed30c0abaa92686f0 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 14 Dec 2024 19:01:16 +0100 Subject: [PATCH] use libxml instead of xq --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc1fbfa..f874f81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,11 +33,13 @@ RUN apk add --no-cache --update \ nginx \ curl \ tar \ - unzip + unzip \ + libxml2-utils + #xq # Create directories structure -RUN mkdir -p /var/www/dotclear -RUN chown -R www:www /var/lib/nginx /var/www +RUN mkdir -p /var/www/dotclear \ + && chown -R www:www /var/lib/nginx /var/www # Copy nginx configuration COPY etc/nginx.conf /etc/nginx/nginx.conf @@ -95,8 +97,8 @@ COPY etc/php-fpm.conf /etc/${VER_PHP}/php-fpm.d/www.conf # Download latest Dotclear version RUN curl -fsSL -o versions.xml "http://download.dotclear.org/versions.xml" \ - && curl -fsSL -o dotclear.zip $(cat versions.xml | xq -x "//release[@name='$CNL_DOTCLEAR']/@href") \ - && echo "$(cat versions.xml | xq -x "//release[@name='$CNL_DOTCLEAR']/@checksum") dotclear.zip" | md5sum -c - \ + && curl -fsSL -o dotclear.zip $(xmllint --xpath "//release[@name='$CNL_DOTCLEAR']/@href" versions.xml | awk -F'[="]' '!/>/{print $(NF-1)}') \ + && echo "$(xmllint --xpath "//release[@name='$CNL_DOTCLEAR']/@checksum" versions.xml | awk -F'[="]' '!/>/{print $(NF-1)}') dotclear.zip" | md5sum -c - \ && mkdir -p /usr/src/dotclear \ && unzip -d /usr/src dotclear.zip \ && rm dotclear.zip