Skip to content

Commit 76e06d6

Browse files
Fix inotify extension installation in Dockerfile (#1308)
The original Dockerfile attempted to install the inotify extension via PECL, but the package is not available on PECL for the current PHP version (8.2). This caused the build to fail. This change switches to using the system package manager (apt) to install the php${DDEV_PHP_VERSION}-inotify package, which provides the inotify extension for the specific PHP version in use. This resolves the build failure and allows the Docker image to be built successfully. The fix involved modifying `.ddev/web-build/Dockerfile.inotify` to replace: ``` RUN pecl install ${extension} ``` with: ``` RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y php${DDEV_PHP_VERSION}-inotify ```
1 parent 5e83752 commit 76e06d6

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

.ddev/web-build/Dockerfile.inotify

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
ENV extension=inotify
2-
SHELL ["/bin/bash", "-c"]
3-
# Install the needed development packages
4-
RUN (apt-get update || true) && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends --no-install-suggests build-essential php-pear php${DDEV_PHP_VERSION}-dev
5-
RUN pecl install ${extension}
6-
RUN echo "extension=${extension}.so" > /etc/php/${DDEV_PHP_VERSION}/mods-available/${extension}.ini && chmod 666 /etc/php/${DDEV_PHP_VERSION}/mods-available/${extension}.ini
7-
RUN phpenmod ${extension}
1+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y php${DDEV_PHP_VERSION}-inotify

0 commit comments

Comments
 (0)