Skip to content

Commit

Permalink
Add threadsafe (zts) to Apache so mpm_event can be used; point zts ta…
Browse files Browse the repository at this point in the history
…gs to apache (for <7.3)
  • Loading branch information
yosifkit authored and tianon committed Nov 26, 2018
1 parent 8d9fb94 commit 26ec001
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 24 deletions.
13 changes: 0 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,37 @@ env:
- VERSION=7.3-rc VARIANT=stretch/cli
- VERSION=7.3-rc VARIANT=stretch/apache
- VERSION=7.3-rc VARIANT=stretch/fpm
- VERSION=7.3-rc VARIANT=stretch/zts
- VERSION=7.3-rc VARIANT=alpine3.8/cli
- VERSION=7.3-rc VARIANT=alpine3.8/fpm
- VERSION=7.3-rc VARIANT=alpine3.8/zts
- VERSION=7.2 VARIANT=stretch/cli
- VERSION=7.2 VARIANT=stretch/apache
- VERSION=7.2 VARIANT=stretch/fpm
- VERSION=7.2 VARIANT=stretch/zts
- VERSION=7.2 VARIANT=alpine3.8/cli
- VERSION=7.2 VARIANT=alpine3.8/fpm
- VERSION=7.2 VARIANT=alpine3.8/zts
- VERSION=7.1 VARIANT=stretch/cli
- VERSION=7.1 VARIANT=stretch/apache
- VERSION=7.1 VARIANT=stretch/fpm
- VERSION=7.1 VARIANT=stretch/zts
- VERSION=7.1 VARIANT=jessie/cli
- VERSION=7.1 VARIANT=jessie/apache
- VERSION=7.1 VARIANT=jessie/fpm
- VERSION=7.1 VARIANT=jessie/zts
- VERSION=7.1 VARIANT=alpine3.8/cli
- VERSION=7.1 VARIANT=alpine3.8/fpm
- VERSION=7.1 VARIANT=alpine3.8/zts
- VERSION=7.0 VARIANT=stretch/cli
- VERSION=7.0 VARIANT=stretch/apache
- VERSION=7.0 VARIANT=stretch/fpm
- VERSION=7.0 VARIANT=stretch/zts
- VERSION=7.0 VARIANT=jessie/cli
- VERSION=7.0 VARIANT=jessie/apache
- VERSION=7.0 VARIANT=jessie/fpm
- VERSION=7.0 VARIANT=jessie/zts
- VERSION=7.0 VARIANT=alpine3.7/cli
- VERSION=7.0 VARIANT=alpine3.7/fpm
- VERSION=7.0 VARIANT=alpine3.7/zts
- VERSION=5.6 VARIANT=stretch/cli
- VERSION=5.6 VARIANT=stretch/apache
- VERSION=5.6 VARIANT=stretch/fpm
- VERSION=5.6 VARIANT=stretch/zts
- VERSION=5.6 VARIANT=jessie/cli
- VERSION=5.6 VARIANT=jessie/apache
- VERSION=5.6 VARIANT=jessie/fpm
- VERSION=5.6 VARIANT=jessie/zts
- VERSION=5.6 VARIANT=alpine3.8/cli
- VERSION=5.6 VARIANT=alpine3.8/fpm
- VERSION=5.6 VARIANT=alpine3.8/zts

install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
Expand Down
2 changes: 1 addition & 1 deletion 5.6/jessie/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 5.6/stretch/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 7.0/jessie/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 7.0/stretch/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 7.1/jessie/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 7.1/stretch/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 7.2/stretch/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion 7.3-rc/stretch/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
Expand Down
2 changes: 1 addition & 1 deletion apache-Dockerfile-block-1
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ RUN { \
&& a2enconf docker-php

ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
ENV PHP_EXTRA_CONFIGURE_ARGS --disable-cgi --enable-maintainer-zts --with-apxs2
10 changes: 9 additions & 1 deletion generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,24 @@ for version in "${versions[@]}"; do
cli \
apache \
fpm \
zts \
; do
dir="$version/$suite/$variant"

[ -f "$dir/Dockerfile" ] || continue

commit="$(dirCommit "$dir")"
fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "PHP_VERSION" { print $3; exit }')"

baseAliases=( $fullVersion "${versionAliases[@]}" )
variantAliases=( "${baseAliases[@]/%/-$variant}" )
# zts (thread safe php) is available in the apache image, so lets keep a compatability tag for zts on old versions
# https://github.com/docker-library/php/issues/742
# TODO remove zts tags completely
if [ "$variant" = 'apache' ]; then
if [ "$version" = '7.2' ] || [ "$version" = '7.1' ] || [ "$version" = '7.0' ] || [ "$version" = '5.6' ]; then
variantAliases+=( "${baseAliases[@]/%/-zts}" )
fi
fi
variantAliases=( "${variantAliases[@]//latest-/}" )

if [ "$variant" = 'cli' ]; then
Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ for version in "${versions[@]}"; do
baseDockerfile=Dockerfile-alpine.template
fi

for variant in cli apache fpm zts; do
for variant in cli apache fpm; do
[ -d "$version/$suite/$variant" ] || continue
{ generated_warning; cat "$baseDockerfile"; } > "$version/$suite/$variant/Dockerfile"

Expand Down

0 comments on commit 26ec001

Please sign in to comment.