29 lines
688 B
Docker
29 lines
688 B
Docker
FROM debian:12
|
|
RUN apt-get update
|
|
RUN apt-get upgrade -y
|
|
RUN apt-get install -y \
|
|
php-cli php-json php-curl composer \
|
|
php-pear php-dev \
|
|
libmosquitto-dev libmosquitto1 mosquitto-clients \
|
|
wget \
|
|
procps \
|
|
php-yaml \
|
|
locales-all \
|
|
git \
|
|
build-essential \
|
|
cmake
|
|
|
|
WORKDIR /opt
|
|
RUN git clone https://github.com/nismoryco/Mosquitto-PHP.git
|
|
WORKDIR /opt/Mosquitto-PHP
|
|
RUN phpize
|
|
RUN ./configure
|
|
RUN make
|
|
RUN make install
|
|
RUN echo "extension=mosquitto.so" >/etc/php/8.2/mods-available/mosquitto.ini
|
|
RUN ln -s /etc/php/8.2/mods-available/mosquitto.ini /etc/php/8.2/cli/conf.d/20-mosquitto.ini
|
|
|
|
ADD run.php /usr/local/bin/run
|
|
|
|
ENTRYPOINT /usr/local/bin/run
|