From 05babc0091b9605577e876f21fdbd0b5bcbfb227 Mon Sep 17 00:00:00 2001 From: Wesley Bos Date: Mon, 29 Sep 2025 17:43:48 +0200 Subject: [PATCH 1/2] fix: required changes for ARM to build --- docker/toolbox/latest/Dockerfile.jinja2 | 1 + template/Dockerfile/images/php.jinja2 | 14 +++++++------- template/Dockerfile/tools.jinja2 | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/toolbox/latest/Dockerfile.jinja2 b/docker/toolbox/latest/Dockerfile.jinja2 index 3b185c2cb..cd1b0c49f 100644 --- a/docker/toolbox/latest/Dockerfile.jinja2 +++ b/docker/toolbox/latest/Dockerfile.jinja2 @@ -1,4 +1,5 @@ {{ docker.fromOfficial("alpine") }} +ARG TARGETARCH RUN apk add --no-cache \ ca-certificates \ diff --git a/template/Dockerfile/images/php.jinja2 b/template/Dockerfile/images/php.jinja2 index 87f6501ae..32e5462a4 100644 --- a/template/Dockerfile/images/php.jinja2 +++ b/template/Dockerfile/images/php.jinja2 @@ -77,10 +77,10 @@ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ {%- endif %} - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ {%- if version != '8.4' %} && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ -{%- endif %} +{%- endif %} && docker-php-ext-install \ bcmath \ {%- if version == '8.0' or version == '8.1' or version == '8.2' or version == '8.3' or version == '8.4' %} @@ -248,7 +248,7 @@ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ @@ -279,7 +279,7 @@ && docker-php-ext-configure ldap \ {%- if version != '8.4' %} && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ -{%- endif %} +{%- endif %} && docker-php-ext-install \ bcmath \ bz2 \ @@ -296,9 +296,9 @@ gettext \ ldap \ mysqli \ -{%- if version != '8.4' %} +{%- if version != '8.4' %} imap \ -{%- endif %} +{%- endif %} {%- if version != '7.4' and version != '8.0' and version != '8.1' and version != '8.2' and version != '8.3' and version != '8.4' %} hash \ {%- endif %} @@ -398,7 +398,7 @@ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ diff --git a/template/Dockerfile/tools.jinja2 b/template/Dockerfile/tools.jinja2 index 458837ce9..b15ac5b8b 100644 --- a/template/Dockerfile/tools.jinja2 +++ b/template/Dockerfile/tools.jinja2 @@ -1,14 +1,14 @@ {% macro goreplace(path="/usr/local/bin", version="22.10.0") -%} ## Install go-replace - && wget -O "{{ path }}/go-replace" "https://github.com/webdevops/go-replace/releases/download/{{ version }}/go-replace.linux.amd64" \ + && wget -O "{{ path }}/go-replace" "https://github.com/webdevops/go-replace/releases/download/{{ version }}/go-replace.linux.$TARGETARCH" \ && chmod +x "{{ path }}/go-replace" \ && "{{ path }}/go-replace" --version {%- endmacro %} -{% macro gosu(path="/sbin", arch="amd64", version="1.10") -%} +{% macro gosu(path="/sbin", version="1.10") -%} # Install gosu - && wget -O "{{ path }}/gosu" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-{{ arch }}" \ - && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-{{ arch }}.asc" \ + && wget -O "{{ path }}/gosu" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-$TARGETARCH" \ + && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-$TARGETARCH.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /tmp/gosu.asc "{{ path }}/gosu" \ From 1e5f5a1c948ef9c2bad0f698b432ec6a1f737abd Mon Sep 17 00:00:00 2001 From: Wesley Bos Date: Mon, 29 Sep 2025 17:44:24 +0200 Subject: [PATCH 2/2] chore: resuling changes in Dockerfiles Can revert this commit as they should be auto-generated --- docker/php-official/8.4-alpine/Dockerfile | 8 ++++---- docker/php-official/8.4/Dockerfile | 2 +- docker/toolbox/latest/Dockerfile | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docker/php-official/8.4-alpine/Dockerfile b/docker/php-official/8.4-alpine/Dockerfile index f79d3d0f6..409e2c4c5 100644 --- a/docker/php-official/8.4-alpine/Dockerfile +++ b/docker/php-official/8.4-alpine/Dockerfile @@ -22,7 +22,7 @@ ENV APPLICATION_USER=application \ APPLICATION_PATH=/app \ APPLICATION_UID=1000 \ APPLICATION_GID=1000 -ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i" +ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i" ENV LD_PRELOAD="/usr/lib/preloadable_libiconv.so" ENV COMPOSER_VERSION="2" @@ -125,7 +125,7 @@ RUN set -x \ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ @@ -148,7 +148,7 @@ RUN set -x \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ - && docker-php-ext-configure ldap \ + && docker-php-ext-configure ldap \ && docker-php-ext-install \ bcmath \ bz2 \ @@ -228,7 +228,7 @@ RUN set -x \ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ diff --git a/docker/php-official/8.4/Dockerfile b/docker/php-official/8.4/Dockerfile index f79839c03..5700d6700 100644 --- a/docker/php-official/8.4/Dockerfile +++ b/docker/php-official/8.4/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && docker-php-ext-install \ bcmath \ amqp \ diff --git a/docker/toolbox/latest/Dockerfile b/docker/toolbox/latest/Dockerfile index 780356b8d..530b6bf56 100644 --- a/docker/toolbox/latest/Dockerfile +++ b/docker/toolbox/latest/Dockerfile @@ -4,6 +4,7 @@ #+++++++++++++++++++++++++++++++++++++++ FROM alpine:latest +ARG TARGETARCH RUN apk add --no-cache \ ca-certificates \ @@ -29,13 +30,13 @@ RUN apk add --no-cache \ && wget -O /tmp/baselayout-install.sh https://raw.githubusercontent.com/webdevops/Docker-Image-Baselayout/master/install.sh \ && sh /tmp/baselayout-install.sh /baselayout \ ## Install go-replace - && wget -O "/baselayout/usr/local/bin/go-replace" "https://github.com/webdevops/go-replace/releases/download/22.10.0/go-replace.linux.amd64" \ + && wget -O "/baselayout/usr/local/bin/go-replace" "https://github.com/webdevops/go-replace/releases/download/22.10.0/go-replace.linux.$TARGETARCH" \ && chmod +x "/baselayout/usr/local/bin/go-replace" \ && "/baselayout/usr/local/bin/go-replace" --version \ && ln -s /baselayout/usr/local/bin/go-replace /usr/local/bin/ \ # Install gosu - && wget -O "/baselayout/sbin/gosu" "https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64" \ - && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64.asc" \ + && wget -O "/baselayout/sbin/gosu" "https://github.com/tianon/gosu/releases/download/1.10/gosu-$TARGETARCH" \ + && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/1.10/gosu-$TARGETARCH.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /tmp/gosu.asc "/baselayout/sbin/gosu" \