Skip to content

Commit

Permalink
Merge pull request docker-library#605 from infosiftr/shared-sodium
Browse files Browse the repository at this point in the history
Update sodium extension to be shared (so it can be replaced if necessary by users)
  • Loading branch information
yosifkit authored Mar 21, 2018
2 parents fe07ced + 604dfc0 commit 7707290
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 12 deletions.
5 changes: 4 additions & 1 deletion 7.2/alpine3.6/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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 \
Expand Down Expand Up @@ -157,6 +157,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion 7.2/alpine3.6/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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 \
Expand Down Expand Up @@ -158,6 +158,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"]
##<autogenerated>##
WORKDIR /var/www/html
Expand Down
5 changes: 4 additions & 1 deletion 7.2/alpine3.6/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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 \
Expand Down Expand Up @@ -158,6 +158,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion 7.2/alpine3.7/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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 \
Expand Down Expand Up @@ -157,6 +157,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion 7.2/alpine3.7/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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 \
Expand Down Expand Up @@ -158,6 +158,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"]
##<autogenerated>##
WORKDIR /var/www/html
Expand Down
5 changes: 4 additions & 1 deletion 7.2/alpine3.7/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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 \
Expand Down Expand Up @@ -158,6 +158,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion 7.2/stretch/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,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 \
Expand Down Expand Up @@ -246,6 +246,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"]
##<autogenerated>##
COPY apache2-foreground /usr/local/bin/
Expand Down
5 changes: 4 additions & 1 deletion 7.2/stretch/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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 \
Expand Down Expand Up @@ -187,6 +187,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion 7.2/stretch/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,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 \
Expand Down Expand Up @@ -188,6 +188,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"]
##<autogenerated>##
WORKDIR /var/www/html
Expand Down
5 changes: 4 additions & 1 deletion 7.2/stretch/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,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 \
Expand Down Expand Up @@ -188,6 +188,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,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 \
Expand Down Expand Up @@ -151,6 +151,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,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 \
Expand Down Expand Up @@ -181,6 +181,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"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
8 changes: 8 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 7707290

Please sign in to comment.