Skip to content

Commit 87c85e4

Browse files
lcobuccitianon
authored andcommitted
Remove log decoration from workers output
As of PHP 7.3 we finally use STDOUT and STDERR properly in our containers, this disables the '[pool %s] child %d said into %s: \"%s\' format. More info: - php/php-src#2458 - https://bugs.php.net/bug.php?id=71880 - docker-library#207
1 parent f363b9f commit 87c85e4

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

7.3-rc/alpine3.8/fpm/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ RUN set -ex \
205205
echo; \
206206
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
207207
echo 'catch_workers_output = yes'; \
208+
echo 'decorate_workers_output = no'; \
208209
} | tee php-fpm.d/docker.conf \
209210
&& { \
210211
echo '[global]'; \

7.3-rc/stretch/fpm/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ RUN set -ex \
244244
echo; \
245245
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
246246
echo 'catch_workers_output = yes'; \
247+
echo 'decorate_workers_output = no'; \
247248
} | tee php-fpm.d/docker.conf \
248249
&& { \
249250
echo '[global]'; \

fpm-Dockerfile-block-2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ RUN set -ex \
2727
echo; \
2828
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
2929
echo 'catch_workers_output = yes'; \
30+
echo 'decorate_workers_output = no'; \
3031
} | tee php-fpm.d/docker.conf \
3132
&& { \
3233
echo '[global]'; \

update.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ for version in "${versions[@]}"; do
175175
# php 5 still needs older ssl
176176
sed -ri 's/libssl-dev/libssl1.0-dev/g' "$version/$suite/$variant/Dockerfile"
177177
fi
178+
if [ "$variant" = 'fpm' -a "$majorVersion" = '5' ] || [ "$variant" = 'fpm' -a "$majorVersion" = '7' -a "$minorVersion" -lt '3' ]; then
179+
# php-fpm "decorate_workers_output" is only available in 7.3+
180+
sed -ri '/decorate_workers_output/d' "$version/$suite/$variant/Dockerfile"
181+
fi
178182

179183
# remove any _extra_ blank lines created by the deletions above
180184
awk '

0 commit comments

Comments
 (0)