Skip to content

Commit

Permalink
Fix PHP extensions not found
Browse files Browse the repository at this point in the history
  • Loading branch information
akunzai committed Jul 6, 2023
1 parent d5ba5f9 commit b5c79ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ RUN set -eux; \
libfreetype6-dev libicu-dev libjpeg62-turbo-dev \
libpng-dev libxslt1-dev libzip-dev libwebp-dev libxml2-dev \
${PHP_EXTRA_BUILD_DEPS:-}; \
rm -rf /var/lib/apt/lists/*; \
# https://www.php.net/manual/en/image.installation.php
docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-install -j$(nproc) opcache soap \
Expand All @@ -32,13 +31,14 @@ RUN set -eux; \
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { print $(NF-1) }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -r apt-mark manual; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*;

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down

0 comments on commit b5c79ac

Please sign in to comment.