Skip to content

Commit 94c4827

Browse files
ReactDevs007tianon
authored andcommitted
Update sodium extension to be shared (so it can be replaced if necessary by users)
1 parent a14e9d4 commit 94c4827

File tree

13 files changed

+56
-12
lines changed

13 files changed

+56
-12
lines changed

7.2/alpine3.6/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ RUN set -xe \
119119
# --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)
120120
--enable-mysqlnd \
121121
# https://wiki.php.net/rfc/libsodium
122-
--with-sodium \
122+
--with-sodium=shared \
123123
\
124124
--with-curl \
125125
--with-libedit \
@@ -154,6 +154,9 @@ RUN set -xe \
154154

155155
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
156156

157+
# 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)
158+
RUN docker-php-ext-enable sodium
159+
157160
ENTRYPOINT ["docker-php-entrypoint"]
158161
##<autogenerated>##
159162
CMD ["php", "-a"]

7.2/alpine3.6/fpm/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN set -xe \
120120
# --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)
121121
--enable-mysqlnd \
122122
# https://wiki.php.net/rfc/libsodium
123-
--with-sodium \
123+
--with-sodium=shared \
124124
\
125125
--with-curl \
126126
--with-libedit \
@@ -155,6 +155,9 @@ RUN set -xe \
155155

156156
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
157157

158+
# 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)
159+
RUN docker-php-ext-enable sodium
160+
158161
ENTRYPOINT ["docker-php-entrypoint"]
159162
##<autogenerated>##
160163
WORKDIR /var/www/html

7.2/alpine3.6/zts/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN set -xe \
120120
# --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)
121121
--enable-mysqlnd \
122122
# https://wiki.php.net/rfc/libsodium
123-
--with-sodium \
123+
--with-sodium=shared \
124124
\
125125
--with-curl \
126126
--with-libedit \
@@ -155,6 +155,9 @@ RUN set -xe \
155155

156156
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
157157

158+
# 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)
159+
RUN docker-php-ext-enable sodium
160+
158161
ENTRYPOINT ["docker-php-entrypoint"]
159162
##<autogenerated>##
160163
CMD ["php", "-a"]

7.2/alpine3.7/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ RUN set -xe \
119119
# --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)
120120
--enable-mysqlnd \
121121
# https://wiki.php.net/rfc/libsodium
122-
--with-sodium \
122+
--with-sodium=shared \
123123
\
124124
--with-curl \
125125
--with-libedit \
@@ -154,6 +154,9 @@ RUN set -xe \
154154

155155
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
156156

157+
# 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)
158+
RUN docker-php-ext-enable sodium
159+
157160
ENTRYPOINT ["docker-php-entrypoint"]
158161
##<autogenerated>##
159162
CMD ["php", "-a"]

7.2/alpine3.7/fpm/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN set -xe \
120120
# --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)
121121
--enable-mysqlnd \
122122
# https://wiki.php.net/rfc/libsodium
123-
--with-sodium \
123+
--with-sodium=shared \
124124
\
125125
--with-curl \
126126
--with-libedit \
@@ -155,6 +155,9 @@ RUN set -xe \
155155

156156
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
157157

158+
# 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)
159+
RUN docker-php-ext-enable sodium
160+
158161
ENTRYPOINT ["docker-php-entrypoint"]
159162
##<autogenerated>##
160163
WORKDIR /var/www/html

7.2/alpine3.7/zts/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN set -xe \
120120
# --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)
121121
--enable-mysqlnd \
122122
# https://wiki.php.net/rfc/libsodium
123-
--with-sodium \
123+
--with-sodium=shared \
124124
\
125125
--with-curl \
126126
--with-libedit \
@@ -155,6 +155,9 @@ RUN set -xe \
155155

156156
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
157157

158+
# 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)
159+
RUN docker-php-ext-enable sodium
160+
158161
ENTRYPOINT ["docker-php-entrypoint"]
159162
##<autogenerated>##
160163
CMD ["php", "-a"]

7.2/stretch/apache/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ RUN set -eux; \
201201
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
202202
--with-password-argon2 \
203203
# https://wiki.php.net/rfc/libsodium
204-
--with-sodium \
204+
--with-sodium=shared \
205205
\
206206
--with-curl \
207207
--with-libedit \
@@ -243,6 +243,9 @@ RUN set -eux; \
243243

244244
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
245245

246+
# 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)
247+
RUN docker-php-ext-enable sodium
248+
246249
ENTRYPOINT ["docker-php-entrypoint"]
247250
##<autogenerated>##
248251
COPY apache2-foreground /usr/local/bin/

7.2/stretch/cli/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ RUN set -eux; \
142142
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
143143
--with-password-argon2 \
144144
# https://wiki.php.net/rfc/libsodium
145-
--with-sodium \
145+
--with-sodium=shared \
146146
\
147147
--with-curl \
148148
--with-libedit \
@@ -184,6 +184,9 @@ RUN set -eux; \
184184

185185
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
186186

187+
# 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)
188+
RUN docker-php-ext-enable sodium
189+
187190
ENTRYPOINT ["docker-php-entrypoint"]
188191
##<autogenerated>##
189192
CMD ["php", "-a"]

7.2/stretch/fpm/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ RUN set -eux; \
143143
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
144144
--with-password-argon2 \
145145
# https://wiki.php.net/rfc/libsodium
146-
--with-sodium \
146+
--with-sodium=shared \
147147
\
148148
--with-curl \
149149
--with-libedit \
@@ -185,6 +185,9 @@ RUN set -eux; \
185185

186186
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
187187

188+
# 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)
189+
RUN docker-php-ext-enable sodium
190+
188191
ENTRYPOINT ["docker-php-entrypoint"]
189192
##<autogenerated>##
190193
WORKDIR /var/www/html

7.2/stretch/zts/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ RUN set -eux; \
143143
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
144144
--with-password-argon2 \
145145
# https://wiki.php.net/rfc/libsodium
146-
--with-sodium \
146+
--with-sodium=shared \
147147
\
148148
--with-curl \
149149
--with-libedit \
@@ -185,6 +185,9 @@ RUN set -eux; \
185185

186186
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
187187

188+
# 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)
189+
RUN docker-php-ext-enable sodium
190+
188191
ENTRYPOINT ["docker-php-entrypoint"]
189192
##<autogenerated>##
190193
CMD ["php", "-a"]

Dockerfile-alpine.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ RUN set -xe \
113113
# --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)
114114
--enable-mysqlnd \
115115
# https://wiki.php.net/rfc/libsodium
116-
--with-sodium \
116+
--with-sodium=shared \
117117
\
118118
--with-curl \
119119
--with-libedit \
@@ -148,6 +148,9 @@ RUN set -xe \
148148

149149
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
150150

151+
# 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)
152+
RUN docker-php-ext-enable sodium
153+
151154
ENTRYPOINT ["docker-php-entrypoint"]
152155
##<autogenerated>##
153156
CMD ["php", "-a"]

Dockerfile-debian.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ RUN set -eux; \
136136
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
137137
--with-password-argon2 \
138138
# https://wiki.php.net/rfc/libsodium
139-
--with-sodium \
139+
--with-sodium=shared \
140140
\
141141
--with-curl \
142142
--with-libedit \
@@ -178,6 +178,9 @@ RUN set -eux; \
178178

179179
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
180180

181+
# 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)
182+
RUN docker-php-ext-enable sodium
183+
181184
ENTRYPOINT ["docker-php-entrypoint"]
182185
##<autogenerated>##
183186
CMD ["php", "-a"]

update.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ for version in "${versions[@]}"; do
166166
sed -ri '/sodium/d' "$version/$suite/$variant/Dockerfile"
167167
fi
168168

169+
# remove any _extra_ blank lines created by the deletions above
170+
awk '
171+
NF > 0 { blank = 0 }
172+
NF == 0 { ++blank }
173+
blank < 2 { print }
174+
' "$version/$suite/$variant/Dockerfile" > "$version/$suite/$variant/Dockerfile.new"
175+
mv "$version/$suite/$variant/Dockerfile.new" "$version/$suite/$variant/Dockerfile"
176+
169177
# automatic `-slim` for stretch
170178
# TODO always add slim once jessie is removed
171179
sed -ri \

0 commit comments

Comments
 (0)