如何在 Laradock 中安装 Mosquitto-php

How can I install the Mosquitto-php in Laradock

Mosquitto-php 扩展名:https://github.com/mgdm/Mosquitto-PHP.

我尝试在 laradock/php-fpm/Dockerfile 中添加以下 2 个命令,但没有成功 工作。

apt-get install libmosquitto-dev && \
pecl install Mosquitto-alpha

请多多指教,谢谢

尝试在 dockerfile 中添加:

RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev libxml2-dev libcurl4-gnutls-dev \
        libmosquitto-dev # edit


RUN docker-php-ext-install -j$(nproc) mysqli mbstring pdo pdo_mysql soap curl \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd \
    && pecl install xdebug && docker-php-ext-enable xdebug \
    && pecl install Mosquitto-alpha && docker-php-ext-enable Mosquitto-alpha