Try add this in 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