From 604dfc0baf0b2caeb4baea3896e1be8b89bac1c6 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 21 Mar 2018 11:07:41 -0700 Subject: [PATCH] Update sodium extension to be shared (so it can be replaced if necessary by users) --- 7.2/alpine3.6/cli/Dockerfile | 5 ++++- 7.2/alpine3.6/fpm/Dockerfile | 5 ++++- 7.2/alpine3.6/zts/Dockerfile | 5 ++++- 7.2/alpine3.7/cli/Dockerfile | 5 ++++- 7.2/alpine3.7/fpm/Dockerfile | 5 ++++- 7.2/alpine3.7/zts/Dockerfile | 5 ++++- 7.2/stretch/apache/Dockerfile | 5 ++++- 7.2/stretch/cli/Dockerfile | 5 ++++- 7.2/stretch/fpm/Dockerfile | 5 ++++- 7.2/stretch/zts/Dockerfile | 5 ++++- Dockerfile-alpine.template | 5 ++++- Dockerfile-debian.template | 5 ++++- update.sh | 8 ++++++++ 13 files changed, 56 insertions(+), 12 deletions(-) diff --git a/7.2/alpine3.6/cli/Dockerfile b/7.2/alpine3.6/cli/Dockerfile index ec07f7d9..5323d3ae 100644 --- a/7.2/alpine3.6/cli/Dockerfile +++ b/7.2/alpine3.6/cli/Dockerfile @@ -119,7 +119,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -154,6 +154,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/7.2/alpine3.6/fpm/Dockerfile b/7.2/alpine3.6/fpm/Dockerfile index d8b82b98..6300d437 100644 --- a/7.2/alpine3.6/fpm/Dockerfile +++ b/7.2/alpine3.6/fpm/Dockerfile @@ -120,7 +120,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -155,6 +155,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### WORKDIR /var/www/html diff --git a/7.2/alpine3.6/zts/Dockerfile b/7.2/alpine3.6/zts/Dockerfile index e95d57d2..c11da72a 100644 --- a/7.2/alpine3.6/zts/Dockerfile +++ b/7.2/alpine3.6/zts/Dockerfile @@ -120,7 +120,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -155,6 +155,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/7.2/alpine3.7/cli/Dockerfile b/7.2/alpine3.7/cli/Dockerfile index 0f204bbf..203def9f 100644 --- a/7.2/alpine3.7/cli/Dockerfile +++ b/7.2/alpine3.7/cli/Dockerfile @@ -119,7 +119,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -154,6 +154,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/7.2/alpine3.7/fpm/Dockerfile b/7.2/alpine3.7/fpm/Dockerfile index e809ab8f..e0f45171 100644 --- a/7.2/alpine3.7/fpm/Dockerfile +++ b/7.2/alpine3.7/fpm/Dockerfile @@ -120,7 +120,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -155,6 +155,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### WORKDIR /var/www/html diff --git a/7.2/alpine3.7/zts/Dockerfile b/7.2/alpine3.7/zts/Dockerfile index f2775ce4..6c647f14 100644 --- a/7.2/alpine3.7/zts/Dockerfile +++ b/7.2/alpine3.7/zts/Dockerfile @@ -120,7 +120,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -155,6 +155,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/7.2/stretch/apache/Dockerfile b/7.2/stretch/apache/Dockerfile index c5132e46..74c91491 100644 --- a/7.2/stretch/apache/Dockerfile +++ b/7.2/stretch/apache/Dockerfile @@ -201,7 +201,7 @@ RUN set -eux; \ # https://wiki.php.net/rfc/argon2_password_hash (7.2+) --with-password-argon2 \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -243,6 +243,9 @@ RUN set -eux; \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### COPY apache2-foreground /usr/local/bin/ diff --git a/7.2/stretch/cli/Dockerfile b/7.2/stretch/cli/Dockerfile index 37534b39..6b8c672e 100644 --- a/7.2/stretch/cli/Dockerfile +++ b/7.2/stretch/cli/Dockerfile @@ -142,7 +142,7 @@ RUN set -eux; \ # https://wiki.php.net/rfc/argon2_password_hash (7.2+) --with-password-argon2 \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -184,6 +184,9 @@ RUN set -eux; \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/7.2/stretch/fpm/Dockerfile b/7.2/stretch/fpm/Dockerfile index d4a32707..2f02796f 100644 --- a/7.2/stretch/fpm/Dockerfile +++ b/7.2/stretch/fpm/Dockerfile @@ -143,7 +143,7 @@ RUN set -eux; \ # https://wiki.php.net/rfc/argon2_password_hash (7.2+) --with-password-argon2 \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -185,6 +185,9 @@ RUN set -eux; \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### WORKDIR /var/www/html diff --git a/7.2/stretch/zts/Dockerfile b/7.2/stretch/zts/Dockerfile index 74b47a3f..61499fbf 100644 --- a/7.2/stretch/zts/Dockerfile +++ b/7.2/stretch/zts/Dockerfile @@ -143,7 +143,7 @@ RUN set -eux; \ # https://wiki.php.net/rfc/argon2_password_hash (7.2+) --with-password-argon2 \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -185,6 +185,9 @@ RUN set -eux; \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 60addc96..bf6a80d1 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -113,7 +113,7 @@ RUN set -xe \ # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself) --enable-mysqlnd \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -148,6 +148,9 @@ RUN set -xe \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index a24c0633..a2940f51 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -136,7 +136,7 @@ RUN set -eux; \ # https://wiki.php.net/rfc/argon2_password_hash (7.2+) --with-password-argon2 \ # https://wiki.php.net/rfc/libsodium - --with-sodium \ + --with-sodium=shared \ \ --with-curl \ --with-libedit \ @@ -178,6 +178,9 @@ RUN set -eux; \ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ +# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598) +RUN docker-php-ext-enable sodium + ENTRYPOINT ["docker-php-entrypoint"] #### CMD ["php", "-a"] diff --git a/update.sh b/update.sh index a9617cca..343901ad 100755 --- a/update.sh +++ b/update.sh @@ -166,6 +166,14 @@ for version in "${versions[@]}"; do sed -ri '/sodium/d' "$version/$suite/$variant/Dockerfile" fi + # remove any _extra_ blank lines created by the deletions above + awk ' + NF > 0 { blank = 0 } + NF == 0 { ++blank } + blank < 2 { print } + ' "$version/$suite/$variant/Dockerfile" > "$version/$suite/$variant/Dockerfile.new" + mv "$version/$suite/$variant/Dockerfile.new" "$version/$suite/$variant/Dockerfile" + # automatic `-slim` for stretch # TODO always add slim once jessie is removed sed -ri \