use libxml instead of xq

This commit is contained in:
Jean-Christian Denis 2024-12-14 19:01:16 +01:00
parent a49a1817b2
commit 21761aff3a
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -33,11 +33,13 @@ RUN apk add --no-cache --update \
nginx \ nginx \
curl \ curl \
tar \ tar \
unzip unzip \
libxml2-utils
#xq
# Create directories structure # Create directories structure
RUN mkdir -p /var/www/dotclear RUN mkdir -p /var/www/dotclear \
RUN chown -R www:www /var/lib/nginx /var/www && chown -R www:www /var/lib/nginx /var/www
# Copy nginx configuration # Copy nginx configuration
COPY etc/nginx.conf /etc/nginx/nginx.conf 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 # Download latest Dotclear version
RUN curl -fsSL -o versions.xml "http://download.dotclear.org/versions.xml" \ 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") \ && curl -fsSL -o dotclear.zip $(xmllint --xpath "//release[@name='$CNL_DOTCLEAR']/@href" versions.xml | awk -F'[="]' '!/>/{print $(NF-1)}') \
&& echo "$(cat versions.xml | xq -x "//release[@name='$CNL_DOTCLEAR']/@checksum") dotclear.zip" | md5sum -c - \ && echo "$(xmllint --xpath "//release[@name='$CNL_DOTCLEAR']/@checksum" versions.xml | awk -F'[="]' '!/>/{print $(NF-1)}') dotclear.zip" | md5sum -c - \
&& mkdir -p /usr/src/dotclear \ && mkdir -p /usr/src/dotclear \
&& unzip -d /usr/src dotclear.zip \ && unzip -d /usr/src dotclear.zip \
&& rm dotclear.zip && rm dotclear.zip