@@ -19,7 +19,7 @@ RUN yum install -y yum-utils && \
1919 dnf config-manager --set-enabled crb || dnf config-manager --set-enabled powertools || true
2020
2121# Install minimal tools needed for re2c build (replace curl-minimal with full curl)
22- RUN yum install -y xz tar gcc gcc-c++ make
22+ RUN yum install -y xz tar gcc gcc-c++ make cmake
2323
2424ENV RE2C_VERSION=3.1
2525RUN curl -fsSL -o /tmp/re2c.tar.xz https://github.com/skvadrik/re2c/releases/download/${RE2C_VERSION}/re2c-${RE2C_VERSION}.tar.xz \
@@ -93,6 +93,19 @@ RUN ./configure \
9393&& make install \
9494&& strip /usr/local/bin/php /usr/local/sbin/php-fpm || true
9595
96+ WORKDIR /usr/src
97+ RUN git clone https://github.com/e-dant/watcher.git
98+ WORKDIR /usr/src/watcher
99+ RUN cmake -S . -B build \
100+ -DCMAKE_BUILD_TYPE=Release \
101+ -DCMAKE_INSTALL_PREFIX=/usr/local \
102+ -DBUILD_LIB=ON \
103+ -DBUILD_BIN=ON \
104+ -DBUILD_HDR=ON && \
105+ cmake --build build && \
106+ cmake --install build && \
107+ ldconfig
108+
96109FROM base AS final
97110
98111COPY --from=php-build /usr/local /usr/local
@@ -101,16 +114,9 @@ COPY frankenphp-binary/ /tmp/frankenphp-binary/
101114RUN if [ -f /tmp/frankenphp-binary/frankenphp ]; then \
102115 cp /tmp/frankenphp-binary/frankenphp /usr/local/bin/frankenphp && \
103116 chmod +x /usr/local/bin/frankenphp && \
104- [ -f /tmp/frankenphp-binary/lib/libphp.so ] && cp /tmp/frankenphp-binary/lib/libphp.so /usr/local/lib/libphp.so || true && \
105- [ -f /tmp/frankenphp-binary/lib/libwatcher-c.so.0 ] && cp /tmp/frankenphp-binary/lib/libwatcher-c.so.0 /usr/local/lib/libwatcher-c.so.0 || true && \
106- [ -f /tmp/frankenphp-binary/lib/libargon2.so.1 ] && cp /tmp/frankenphp-binary/lib/libargon2.so.1 /usr/local/lib/libargon2.so.1 || true && \
107- mkdir -p /etc/frankenphp/caddy.d \
108- && mkdir -p /etc/frankenphp/php.d \
109- && mkdir -p /usr/lib/frankenphp/modules \
110- && echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf \
111- && ldconfig \
112- && echo "FrankenPHP installed. Checking dependencies:" \
113- && ldd /usr/local/bin/frankenphp 2>/dev/null | grep -E "libphp|libargon2|not found" || true; \
117+ mkdir -p /etc/frankenphp/caddy.d && \
118+ mkdir -p /etc/frankenphp/php.d && \
119+ mkdir -p /usr/lib/frankenphp/modules; \
114120 fi
115121
116122RUN EXTENSION_DIR=$(php -i | grep "^extension_dir" | awk '{print $3}') && \
@@ -176,10 +182,10 @@ RUN mkdir -p /etc/php-fpm.d && \
176182RUN echo "mysqli.default_socket = /var/lib/mysql/mysql.sock" > /usr/local/etc/php/conf.d/mysql-socket.ini
177183
178184RUN if [ -f /usr/local/bin/frankenphp ]; then \
179- frankenphp -v || echo "Warning: frankenphp version check failed"; \
180- else \
181- echo "WARNING: frankenphp binary not found; FrankenPHP-specific tests will be skipped."; \
182- fi
185+ frankenphp -v || echo "Warning: frankenphp version check failed"; \
186+ else \
187+ echo "WARNING: frankenphp binary not found; FrankenPHP-specific tests will be skipped."; \
188+ fi
183189
184190# Python deps used by test harness
185191RUN python3 -m pip install --no-cache-dir --upgrade pip && \
0 commit comments