Skip to content

Commit 6bfaf08

Browse files
committed
Enable the uploadprogress extension
Fixes #437 Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 04b3786 commit 6bfaf08

File tree

5 files changed

+49
-0
lines changed

5 files changed

+49
-0
lines changed

Dockerfile-alpine.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ RUN set -ex; \
1919
libzip-dev \
2020
; \
2121
\
22+
mkdir -p /usr/src/php/ext/uploadprogress; \
23+
curl -fsSL -o uploadprogress.tar.gz "$UPLOAD_PROGRESS_EXT_URL"; \
24+
echo "$UPLOAD_PROGRESS_SHA256 uploadprogress.tar.gz" | sha256sum -c -; \
25+
tar -xf uploadprogress.tar.gz -C /usr/src/php/ext/uploadprogress --strip-components=1; \
26+
\
2227
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm; \
2328
docker-php-ext-install -j "$(nproc)" \
2429
bz2 \
@@ -27,8 +32,11 @@ RUN set -ex; \
2732
opcache \
2833
zip \
2934
bcmath \
35+
uploadprogress \
3036
; \
3137
\
38+
rm -r /usr/src/php/ext/uploadprogress; \
39+
\
3240
runDeps="$( \
3341
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
3442
| tr ',' '\n' \

Dockerfile-debian.template

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM php:%%PHP_VERSION%%-%%VARIANT%%
22

3+
ENV UPLOAD_PROGRESS_EXT_URL="https://github.com/php/pecl-php-uploadprogress/archive/refs/tags/uploadprogress-2.0.2.tar.gz"
4+
ENV UPLOAD_PROGRESS_SHA256="fe3f6cdfcedad563c970c4fd1cda31e422cfc0df5cc9a217d8c80ed3c8d137f5"
5+
36
# Install dependencies
47
RUN set -ex; \
58
\
@@ -21,6 +24,11 @@ RUN set -ex; \
2124
libzip-dev \
2225
; \
2326
\
27+
mkdir -p /usr/src/php/ext/uploadprogress; \
28+
curl -fsSL -o uploadprogress.tar.gz "$UPLOAD_PROGRESS_EXT_URL"; \
29+
echo "$UPLOAD_PROGRESS_SHA256 uploadprogress.tar.gz" | sha256sum -c -; \
30+
tar -xf uploadprogress.tar.gz -C /usr/src/php/ext/uploadprogress --strip-components=1; \
31+
\
2432
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm; \
2533
docker-php-ext-install -j "$(nproc)" \
2634
bz2 \
@@ -29,8 +37,11 @@ RUN set -ex; \
2937
opcache \
3038
zip \
3139
bcmath \
40+
uploadprogress \
3241
; \
3342
\
43+
rm -r /usr/src/php/ext/uploadprogress; \
44+
\
3445
apt-mark auto '.*' > /dev/null; \
3546
apt-mark manual $savedAptMark; \
3647
extdir="$(php -r 'echo ini_get("extension_dir");')"; \

apache/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
22
FROM php:8.3-apache
33

4+
ENV UPLOAD_PROGRESS_EXT_URL="https://github.com/php/pecl-php-uploadprogress/archive/refs/tags/uploadprogress-2.0.2.tar.gz"
5+
ENV UPLOAD_PROGRESS_SHA256="fe3f6cdfcedad563c970c4fd1cda31e422cfc0df5cc9a217d8c80ed3c8d137f5"
6+
47
# Install dependencies
58
RUN set -ex; \
69
\
@@ -22,6 +25,11 @@ RUN set -ex; \
2225
libzip-dev \
2326
; \
2427
\
28+
mkdir -p /usr/src/php/ext/uploadprogress; \
29+
curl -fsSL -o uploadprogress.tar.gz "$UPLOAD_PROGRESS_EXT_URL"; \
30+
echo "$UPLOAD_PROGRESS_SHA256 uploadprogress.tar.gz" | sha256sum -c -; \
31+
tar -xf uploadprogress.tar.gz -C /usr/src/php/ext/uploadprogress --strip-components=1; \
32+
\
2533
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm; \
2634
docker-php-ext-install -j "$(nproc)" \
2735
bz2 \
@@ -30,8 +38,11 @@ RUN set -ex; \
3038
opcache \
3139
zip \
3240
bcmath \
41+
uploadprogress \
3342
; \
3443
\
44+
rm -r /usr/src/php/ext/uploadprogress; \
45+
\
3546
apt-mark auto '.*' > /dev/null; \
3647
apt-mark manual $savedAptMark; \
3748
extdir="$(php -r 'echo ini_get("extension_dir");')"; \

fpm-alpine/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ RUN set -ex; \
2020
libzip-dev \
2121
; \
2222
\
23+
mkdir -p /usr/src/php/ext/uploadprogress; \
24+
curl -fsSL -o uploadprogress.tar.gz "$UPLOAD_PROGRESS_EXT_URL"; \
25+
echo "$UPLOAD_PROGRESS_SHA256 uploadprogress.tar.gz" | sha256sum -c -; \
26+
tar -xf uploadprogress.tar.gz -C /usr/src/php/ext/uploadprogress --strip-components=1; \
27+
\
2328
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm; \
2429
docker-php-ext-install -j "$(nproc)" \
2530
bz2 \
@@ -28,8 +33,11 @@ RUN set -ex; \
2833
opcache \
2934
zip \
3035
bcmath \
36+
uploadprogress \
3137
; \
3238
\
39+
rm -r /usr/src/php/ext/uploadprogress; \
40+
\
3341
runDeps="$( \
3442
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
3543
| tr ',' '\n' \

fpm/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
22
FROM php:8.3-fpm
33

4+
ENV UPLOAD_PROGRESS_EXT_URL="https://github.com/php/pecl-php-uploadprogress/archive/refs/tags/uploadprogress-2.0.2.tar.gz"
5+
ENV UPLOAD_PROGRESS_SHA256="fe3f6cdfcedad563c970c4fd1cda31e422cfc0df5cc9a217d8c80ed3c8d137f5"
6+
47
# Install dependencies
58
RUN set -ex; \
69
\
@@ -22,6 +25,11 @@ RUN set -ex; \
2225
libzip-dev \
2326
; \
2427
\
28+
mkdir -p /usr/src/php/ext/uploadprogress; \
29+
curl -fsSL -o uploadprogress.tar.gz "$UPLOAD_PROGRESS_EXT_URL"; \
30+
echo "$UPLOAD_PROGRESS_SHA256 uploadprogress.tar.gz" | sha256sum -c -; \
31+
tar -xf uploadprogress.tar.gz -C /usr/src/php/ext/uploadprogress --strip-components=1; \
32+
\
2533
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm; \
2634
docker-php-ext-install -j "$(nproc)" \
2735
bz2 \
@@ -30,8 +38,11 @@ RUN set -ex; \
3038
opcache \
3139
zip \
3240
bcmath \
41+
uploadprogress \
3342
; \
3443
\
44+
rm -r /usr/src/php/ext/uploadprogress; \
45+
\
3546
apt-mark auto '.*' > /dev/null; \
3647
apt-mark manual $savedAptMark; \
3748
extdir="$(php -r 'echo ini_get("extension_dir");')"; \

0 commit comments

Comments
 (0)