Skip to content

Commit

Permalink
Use --no-network option for apk
Browse files Browse the repository at this point in the history
This is to avoid the creation of index cache files from the package
manager, similar to the --no-cache option.
  • Loading branch information
J0WI authored and legoktm committed Jul 13, 2023
1 parent f69814c commit 8cdcf9d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions 1.35/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN set -eux; \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del .build-deps
apk add --no-network --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del --no-network .build-deps

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down Expand Up @@ -84,6 +84,6 @@ RUN set -eux; \
rm -rf "$GNUPGHOME" mediawiki.tar.gz.sig mediawiki.tar.gz; \
chown -R www-data:www-data extensions skins cache images; \
\
apk del .fetch-deps
apk del --no-network .fetch-deps

CMD ["php-fpm"]
6 changes: 3 additions & 3 deletions 1.39/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN set -eux; \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del .build-deps
apk add --no-network --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del --no-network .build-deps

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down Expand Up @@ -84,6 +84,6 @@ RUN set -eux; \
rm -rf "$GNUPGHOME" mediawiki.tar.gz.sig mediawiki.tar.gz; \
chown -R www-data:www-data extensions skins cache images; \
\
apk del .fetch-deps
apk del --no-network .fetch-deps

CMD ["php-fpm"]
6 changes: 3 additions & 3 deletions 1.40/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN set -eux; \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del .build-deps
apk add --no-network --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del --no-network .build-deps

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down Expand Up @@ -84,6 +84,6 @@ RUN set -eux; \
rm -rf "$GNUPGHOME" mediawiki.tar.gz.sig mediawiki.tar.gz; \
chown -R www-data:www-data extensions skins cache images; \
\
apk del .fetch-deps
apk del --no-network .fetch-deps

CMD ["php-fpm"]
6 changes: 3 additions & 3 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN set -eux; \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del .build-deps
apk add --no-network --virtual .mediawiki-phpext-rundeps $runDeps; \
apk del --no-network .build-deps

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down Expand Up @@ -84,6 +84,6 @@ RUN set -eux; \
rm -rf "$GNUPGHOME" mediawiki.tar.gz.sig mediawiki.tar.gz; \
chown -R www-data:www-data extensions skins cache images; \
\
apk del .fetch-deps
apk del --no-network .fetch-deps

CMD ["%%CMD%%"]

0 comments on commit 8cdcf9d

Please sign in to comment.