Docker Community Forums

Share and learn in the Docker community.

Docker unable to locate package trying to install php extension mysqli


(Tote) #1

Hello,

I am fairly new to docker and I am trying to activate some php module in
typo3-docker-boilerplate.
https://github.com/webdevops/TYPO3-docker-boilerplate

I have tried different approach, but get stuck.

This is my dockerfile:
FROM webdevops/php-apache-dev:ubuntu-16.04

ENV PROVISION_CONTEXT "development"

# Deploy scripts/configurations
COPY etc/             /opt/docker/etc/


RUN ln -sf /opt/docker/etc/cron/crontab /etc/cron.d/docker-boilerplate \
    && chmod 0644 /opt/docker/etc/cron/crontab \
    && echo >> /opt/docker/etc/cron/crontab \
    && ln -sf /opt/docker/etc/php/development.ini /opt/docker/etc/php/php.ini

RUN apt-get update && apt-get install -y \
    mysqli \
    && docker-php-ext-install mysqli

#RUN docker-php-ext-install php-mysqli

#COPY ./php.ini /usr/local/etc/php/

#RUN apt-get update && \
#    apt-get install -y mysqli && \
#    docker-php-ext-install mysqli && \
#    docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/  &&  \
#    docker-php-ext-install gd


#RUN apt-get -qq update \
#    && apt-get -qq -y install curl \
#        php-mysqli \
#    && apt-get clean -y \
#    && docker-php-ext-install php-mysqli

# Configure volume/workdir
WORKDIR /app/

This is the error message:
Reading state information…
E: Unable to locate package mysqli
Service ‘app’ failed to build: The command ‘/bin/sh -c apt-get update && apt-get install -y
mysqli && docker-php-ext-install mysqli’ returned a non-zero code: 100

There is although a development.ini which is loaded, and if I edit for example max_input_vars = 5001 and run docker-compose build app this works.

But extension = php_mysqli.dll didn´t

Would be nice, if anyone could give me a hint, how to solve this issue.

Thanks.